This content has been marked as final.
Show 1 reply
-
1. Re: EJB-QL: get a SET of Beans ???
aloubyansky Feb 20, 2004 9:58 PM (in response to ericmacau)Neither EJBQL nor JBossQL supports GROUP BY. In CMP2.0 EJBQL does not support even MAX.
Possible queries:
SELECT OBJECT(o) FROM B o ORDER BY o.id DESC LIMIT 1
Otherwise
SELECT MAX(o.id) FROM B o
SELECT OBJECT(o) FROM B o WHERE o.id = ?1
You have to use JBossQL in both cases.