]
Steve Ebersole closed HHH-1002.
-------------------------------
Closing stale resolved issues
Automatic column grouping for databases < SQL99
-----------------------------------------------
Key: HHH-1002
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1002
Project: Hibernate Core
Issue Type: Improvement
Affects Versions: 3.0.5
Environment: Hibernate 3.0.5, PostgreSQL 8.0
Reporter: Oliver Siegmar
The 4th example at
http://www.hibernate.org/hib_docs/v3/reference/en/html/queryhql.html#quer...
won't work with PostgreSQL.
PostgreSQL throws an exception, because all non-aggregate selected columns have to be
grouped - not only the unique (primary) identifier. Hibernate's behaviour requires a
SQL99 compliant database with support for "functional dependencies". PostgreSQL
only complies with the SQL92 standard.
Surely a workaround would be to add all non-aggregate fields to the group by clause,
manually, but this would require manually hql updates each time the databean gets
modidfied (by a new field, for e.g.). Especially for bigger reports, the group by clause
gets huge and error prone.
Would it be possible to manage the group by clause automatically - depending on if the
used database is SQL99 compliant or not?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: