How can I write a "not exists" query in hibernate criteria or named queries? I am trying to get a named query not exists query which returns the same results as this Oracle SQL query:
select *
from SCHOOL a
where not exists (select 1
from STUDENT b
where B.SCHOOL_ID=a.id
and B.STATUS_ID not in (0,1,2,3,4))