I have a many to many bidirectional relation in my app, right like in official guide.
Using a relational model User
<-> Group
from the link above - lets say I want to select all entries from Group
entity with the following condition
1) Select all groups that have at least one user related to a group.
2) Select all groups that have no users in it.
I can't figure out how to prepare a correct DQL, any ideas please.