class DocumentUserRepository extends EntityRepository
{
public function findByUserAccountDocument(array $users, $account, $document)
{
return $this->createQueryBuilder('a')
->andWhere('a.user IN (:users)')->setParameter('users', $users)
->andWhere('a.account = :account')->setParameter('account', $account)
->andWhere('a.document = :document')->setParameter('document', $document)
->getQuery()->getResult();
}
}