PersonRepository.php 537 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace AppBundle\Entity\Person\Repository;
  3. use Doctrine\ORM\EntityRepository;
  4. /**
  5. * Description of BankAccountRepository
  6. *
  7. */
  8. class PersonRepository extends EntityRepository
  9. {
  10. public function findAllByMail($mail)
  11. {
  12. $queryBuilder = $this->createQueryBuilder('o');
  13. $queryBuilder
  14. ->innerJoin('o.contactPoint', 'contactPoint')
  15. ->andWhere('contactPoint.email = :email')
  16. ->setParameter('email', $mail);
  17. return $queryBuilder->getQuery()->getResult();
  18. }
  19. }