Doctrine not allowing ResultSetMappingBuilder to work

前端 未结 2 375
[愿得一人]
[愿得一人] 2020-12-19 09:18

I\'m using Symfony 2 with doctrine. I\'ve set up a custom repository with a custom find function. As it joins to a subquery I\'m pretty sure from what I\'ve read that I\'ll

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-19 09:34

    Just closing the question as it's solved:

    For anyone who has the same problem the problem was with the 4th parameter sent on this line:

    $rsm->addJoinedEntityFromClassMetadata('Wfuk\DuckBundle\Entity\Ducks', 'ducks', 'c', 'ducks');
    

    Which should have held the field within the Country class that I was using to store the arrayCollection of ducks within it.

提交回复
热议问题