I would like to perform a SELECT from the results of a subquery in DQL. The equivalent of doing the following in SQL:
SELECT * FROM ( SELECT foo1,foo2 FROM bar ) where foo1='something';
The problem I am running into is that it complains that
Error: Class '(' is not defined
The actual DQL that produces that error is:
SELECT u FROM (
SELECT u, COUNT(u) as total
FROM Utterance u LEFT JOIN u.recordings r
WHERE r.speaker IS NULL OR r.speaker <> 5
GROUP BY u.id
) matched WHERE total < 5
So to reiterate, how can I perform a selection from a sub query?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…