The Doctrine2 DQL allows for the following SQL:
$query = $em->createQuery('SELECT u.id FROM CmsUser u WHERE :groupId MEMBER OF u.groups');
$query->setParameter('groupId', $group);
$ids = $query->getResult();
Is the MEMBER OF clause supported by a MySQL database?
Moreover, focusing on the previous example, is $group the id of the entity “Group” or is an instance of the “Group” entity itself?
MEMBER OFis a pure ORM clause and has nothing to with theDBALtherefor it should work with any vendors.MEMBER OFis supposed to accept an Entity but may accept anidentifiertoo.