I've 2 tables with many-to-many relationship => users, roles.
I need to find all users THAT AREN'T IN ANY ROLE.
In SQL it can be done:
WHERE `id` NOT
This should work:
SELECT u FROM user u LEFT JOIN u.roles r WHERE r IS NULL