The way I understand capter 15.41. http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html#hql-null-predicate it is documented to work:
Check a value for nullness. Can be applied to basic attribute references, entity references and parameters.
In the case of the query
from Parent p where p.child is null
I would think that `p.child` is an entity reference (and not an implicit join). Also to remind you: in the query
from Child c where c.parent is null
`c.parent` is currently treated by hibernate as an entity reference and not as an implicit join, so merely changing the owner of the relation can break JPQL queries. To me this is a clear bug. I am not saying it is a very important bug, because there is an easy workaround, but it is a bug non the less. |