Imperator X (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWFkY2MxNjE2...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15749?atlOrigin=eyJpIjoiNWFkY2...
) HHH-15749 (
https://hibernate.atlassian.net/browse/HHH-15749?atlOrigin=eyJpIjoiNWFkY2...
) Hibernate 6 fails when selecting grouped by entities in a specific order (
https://hibernate.atlassian.net/browse/HHH-15749?atlOrigin=eyJpIjoiNWFkY2...
)
Issue Type: Bug Affects Versions: 6.1.5 Assignee: Unassigned Components: hibernate-core
Created: 24/Nov/2022 14:46 PM Environment: Spring Boot 3 Priority: Minor Reporter:
Imperator X (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
See reproducer application here:
https://github.com/imperatorx/hibernate-reproducer-1/blob/master/src/main...
(
https://github.com/imperatorx/hibernate-reproducer-1/blob/master/src/main...
)
Problem: When selecting a parent entity grouped by a static field (string) and two lazy
related entities, it depens on the order of selection if Hibernate generates a corrent SQL
query or not.
Regression:
* With Hibernate 6.1 (spring boot 3), if the first field in the select is a referenced
entity, the query fails with PostgreSQL with column "l1_0.id" *must appear in
the GROUP BY clause or be used in an aggregate function*
* With Hibernate 6.1 (spring boot 3), if the first field in the select is a static field,
the query succeeds
* With Hibernate 5 (spring boot 2), both ways work.
(
https://hibernate.atlassian.net/browse/HHH-15749#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15749#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:eab5823 )