The query should pick the correct implicit join for the nullability semantics of the relation, which is a left join. In contrast, Hibernate 5.8 does not even query the relation as it omits the join, and check whether the primary key of the table is null, and Hibernate 6.2 performs an inner join which can never result in the null predicate becoming true. |