Doctrine2 DQL 允许以下SQL:
$query = $em->createQuery('SELECT u.id FROM CmsUser u WHERE :groupId MEMBER OF u.groups');
$query->setParameter('groupId', $group);
$ids = $query->getResult();
MySQL 数据库是否支持MEMBER OF子句?
此外,关注前面的例子,$group 是实体“Group”的 id 还是“Group”实体本身的实例?