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. 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. |