문제

I have one row in my PostgreSQL table with the name I look for, but Ebean query gives me two identic results (same primary key). Each row has a unique name so I must be able to findUnique()

finder.where().eq("name", name).findUnique()

Handmade sql query gives me only one

String sql = "select id, name from totem where name ilike :name";

Any idea to get findUnique() working ? Is it an Ebean bug ?

도움이 되었습니까?

해결책

I have a OnetoOne relationship with table B.

So Ebean generates an inner join with this table.

Table B has two entry corresponding the object I'm fetching on table A.

So the request returns 2 rows.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top