0

DemandInventoryの 2 つのテーブルで結合操作を実行しています。需要テーブル[demand1, demand2]の 2 つのレコードは、在庫テーブル[inventory1]の同じレコードに対応しています。

$em = $this->getDoctrine()->getEntityManager();
$countQuery = $em->createQueryBuilder()
              ->select('d,i')
              ->from('APIBundle:Demand', 'd')
              ->innerJoin('APIBundle:Inventory', 'i', Join::WITH, 'd.inventoryId = i.inventoryId')

クエリが[demand1, inventory1, demand2, inventory1]を返すことを期待していましたが 、実際にはクエリは[demand1, inventory1, demand2] を返します。

誰かが私が間違っていることを教えてもらえますか?

4

0 に答える 0