Thanks for your answer
I create new defect
https://glassfish.dev.java.net/issues/show_bug.cgi?id=2440.
But it does not solve my problem, because this EQL
[b]SELECT new dto.PersonDTO(res.id, res.firstname, res.surname, count(f))
FROM Person res JOIN res.friends f
WHERE res.id=:id GROUP BY res.id, res.firstname, res.surname[/b]
does not work too.
Is there another way to write this type of query?
For example - see spec. ejb-3_0-fr-spec-persistence.pdf page 96
[b]SELECT c
FROM Customer c
WHERE (SELECT COUNT(o) FROM c.orders o) > 10[/b]
I need the value of subquery to use as argument to PersonDTO construktor.
Fafi
[Message sent by forum member 'fafi' (fafi)]
http://forums.java.net/jive/thread.jspa?messageID=204120