Doctrine 2 limit IN subquery

前端 未结 1 1772
南笙
南笙 2020-12-11 01:35

I\'m trying to use a subquery in a IN statement in Doctrine2.

Here\'s what the raw SQL query should look like :

SELECT * FROM license 
WHERE id 
IN (         


        
相关标签:
1条回答
  • 2020-12-11 02:03

    Unfortunately Doctrine does not support limit on nested queries. Even if you use 2 QueryBuilders and setMaxResults() on the inner QueryBuilder, it will simply be ignored.

    The only way to do this at this time is to run 2 individual queries.

    0 讨论(0)
提交回复
热议问题