| Using "not member of" actually seems to work. I know we had the exact same query using not in working on an older version of Hibernate and ran into this while trying an upgrade. Probably Hibernate became more strict (and more correct) and our query was wrong for all those years. At the moment I can not find the exact same query in our production code anymore so I can't verify if it is still an issue there:. |