コード例 #1
0
 public function isMatched(User $user)
 {
     $qb = $this->createQueryBuilder('b');
     $qb->leftJoin('b.mentor', 'umentor')->leftJoin('b.mentee', 'umentee')->where('umentor.section = :section')->andWhere('umentee.section = :section')->andWhere('umentor.archive = 0')->andWhere('umentee.archive = 0')->setParameter('section', $user->getSection());
     return $qb->getQuery()->getResult();
 }