$em = $this->getEntityManager;
$qb = $em->createQueryBuilder;
$qb->select(array('a', 'c'))
->from('Sdz\BlogBundle\Entity\Article', 'a')
->leftJoin('a.comments', 'c');
$query = $qb->getQuery();
$results = $query->getResult();
return $results;
同时select 多个table
评论
发表评论