I want to do a DQL query like:
$dql = "select p
from AcmeDemoBundle:UserTypeA p
where p.UserTypeB = :id
and (
select top 1 r.boolean
from AcmeDemoBundle:Registry r
)
= true";
But it seems that TOP 1 it's not a valid function in doctrine2.
I can't figure out how can I limit the result of the subquery to one row.
DQL does not support limits on subqueries and neither LIMIT
nor OFFSET
.
See http://www.doctrine-project.org/jira/browse/DDC-885
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With