Assuming two tables, A[a_id, b_id]
and B[b_id,c]
.
I need to execute the HQL query of form "From A a ORDER BY a.b.c"
, while b
is nullable in class A
.
The query,however, returns only instances of A
which have non-null b
property.
This happens because Hibernate generates SQL of form "SELECT FROM A,B WHERE A.b_id = B.b_id ORDER BY B.c"
What is the way to return all instances of A
with those having null
in b
to appear first/last?