doctrine2 addSelect子查询返回多行

时间:2018-03-26 18:55:29

标签: doctrine-orm

我有一个子查询,需要返回多行,但是我收到了这个错误:

 SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row

Doctrine将我的子查询作为标量:

(SELECT m2_.id FROM movie_genres m2_ LEFT JOIN moviesgenres_movies m4_ ON m2_.id = m4_.moviesgenres_id LEFT JOIN movies m3_ ON m3_.id = m4_.movies_id WHERE m3_.id = m0_.id) AS sclr_7

我需要返回多行 - 是否可能?

0 个答案:

没有答案