src/PHPDish/Bundle/NotificationBundle/Service/NotificationManager.php
protected function getParticipantMetadataQb(UserInterface $participant, $seen)
    {
        $qb = $this->getMetadataRepository()->createQueryBuilder('m')
            ->where('m.participant = :participant')
            ->setParameter('participant', $participant);
        if ($seen !== null) {
            $qb->andWhere('m.seen =:seen')->setParameter('seen', (boolean)$seen);
        }
        return $qb;
    }
protected function getParticipantMetadataQb(UserInterface $participant, $seen)
    {
        $qb = $this->getMetadataRepository()->createQueryBuilder('m')
            ->where('m.participant = :participant')
            ->setParameter('participant', $participant);
        if ($seen !== null) {
            $qb->andWhere('m.seen =:seen')->setParameter('seen', (boolean)$seen);
        }
        return $qb;
    }
获取参与者metadata qb

@param UserInterface $participant
@param boolean $seen
@return \Doctrine\ORM\QueryBuilder