The PFD version of the EJB3 persistence spec adds support for grouping by
relationship fields, e.g.
SELECT c.country FROM Customer c GROUP BY c.country
The query runtime does not (yet) support this. The generated SQL misses the
expression in the GROUP BY clause
SELECT t0.COUNTRY_ID, ... FROM CMP3_COUNTRY t0, CMP3_CUSTOMER t1
WHERE (t0.COUNTRY_ID = t1.COUNTRY_ID) GROUP BY
The relationship access in the GROUP BY expression is represented as an
QueryKeyExpression instance. Method printSQL gets called to generated the SQL
which does not handle the relationship case.