Same test run against EclipseLink 2.4.0 testSimplyfiedGroupByObject (the test I described in my comment re Hibernate) passes, as does testGroupById.

testGroupByWithSum fails with:

[EL Warning]: 2012-09-18 13:29:21.993--UnitOfWork(546984732)--Exception [EclipseLink-6051] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.QueryException
Exception Description: Partial object queries are not allowed to maintain the cache or be edited.  You must use dontMaintainCache().
Query: ReadAllQuery(referenceClass=DBObject )

which looks a bit wonky, but doesn't matter really; the point is that the simpler two pass fine on EclipseLink/Pg and fail on Hibernate/Pg.

Changes made to the test case to run on EclipseLink:

  • Change pom.xml to use EclipseLink. See pom.xml in the test case. I retained the use of the Hibernate JPA model gen, because it just doesn't matter.
  • Change persistence.xml to use the JPA standard properties instead of the Hibernate ones. You'll likely need to edit it to add your username and password.
Change By: Craig Ringer (18/Sep/12 12:37 AM)
Attachment: GroupBy-EclipseLink.zip
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira