php - Unexpected result while joining two tables in doctrine2 -
i performing join operation on 2 tables demand , inventory. 2 records in demand table [demand1, demand2] correspond same record in inventory table [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')
i expecting query return [demand1, inventory1, demand2, inventory1] query returns [demand1, inventory1, demand2]
can please tell me doing wrong?
Comments
Post a Comment