Left join with Pagerfanta Doctrine

南楼画角 提交于 2019-12-11 11:28:18

问题


I'd like show results of two tables but I have this Exception: "Cannot count query which selects two FROM components, cannot make distinction".

My query is:

      $queryBuilder = $em->createQueryBuilder()
     ->select('e, e.id AS id, e.f14010101 AS f14010101, e.f14010105 AS f14010105')
     ->from('T140101Bundle\Entity\T140101', 'e')
     ->leftJoin('T140102Bundle\Entity\T140102', 'c', 'WITH', 'c.f14010201= e.id')
     ->groupBy('e.id');

Can you help me?

来源:https://stackoverflow.com/questions/14030475/left-join-with-pagerfanta-doctrine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!