The same fails in Hibernate 5.6 and 6.2
Setup: Two classes A, B declaring a bidirectional OneToOne relation to one another (attributes A.b, B.a), class A declares relation with a join column (named B ) and class B declares relation as mappedBy b.
Hibernate 5.6:
A query that checks {{isNull('a')}} on B (alias b0) produces the where-clause {{b0.id is null}} instead of joining with A (alias a0, join criterion {{a0.b = b0.id}}) and querying {{a0.id is null}}.
When writing a query that checks isNull(A_.b), everything is fine.
Hibernate 6.2
A query that checks {{isNull('a')}} on B (alias b0) produces an inner join with A (alias a0, join criterion {{a0.b = b0.id}}) and querying {{a0.id is null}}. The inner join filters all b0 which are not connected to a0. It should be a {{left join}} in order to fulfill the query. |
|