My action:
$matches_request = $em->getRepository(\'Bundle:ChanceMatch\')->findByRequestUser(1);
$matches_reply = $em->getRepository(\'Bundle:C
It's possible to use Criteria for the complex queries with getRepository():
$criteria = new \Doctrine\Common\Collections\Criteria();
$criteria
->orWhere($criteria->expr()->contains('domains', 'a'))
->orWhere($criteria->expr()->contains('domains', 'b'));
$domain->ages = $em
->getRepository('Group')
->matching($criteria);