Doctrine 抛出 Doctrine\ORM\NonUniqueResultException,代码如下:
$qb->select('a')
->from('TblGames', 'a')
->leftJoin('a.categories', 'b')
->leftJoin('a.user', 'c')
->where("a.gamId = $gid");
->andWhere("a.gamStatus = '1'");
$game = $qb->getQuery()->setHydrationMode(Doctrine\ORM\Query::HYDRATE_ARRAY)->getOneOrNullResult();
即使我尝试更改 ->getResult 也只返回 1 个结果。
答:这是我的错误:$qb->select('a, b, c')