Hi Tom,
the latest spec allows grouping by identification variable, e.g.
SELECT AVG(e.salary) FROM Employee e JOIN e.department d GROUP BY d
I filed a separate glassfish task for this:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=261
I think we need to fix this in two steps:
(1) Upadte the EJBQL parser to accept an identification variable as a
group by item.
(2) Add support for grouping by entity to the expression framework.
The attached change fixes (1). I changed EJBQLParser.g and added a new
alternative to the groupByItem rule. (2) is already covered by glassfish
issue 152.
I propose I check in the attached change, add a comment to 261 and
resolve it as soon as we have the support in the expression framework.
What do you think?
Regards Michael