Marcos Ribes (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63b0372...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiODg5M2U5OTA0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15998?atlOrigin=eyJpIjoiODg5M2...
) HHH-15998 (
https://hibernate.atlassian.net/browse/HHH-15998?atlOrigin=eyJpIjoiODg5M2...
) Incomplete group by expression when with "NEW" operator (
https://hibernate.atlassian.net/browse/HHH-15998?atlOrigin=eyJpIjoiODg5M2...
)
Issue Type: Bug Affects Versions: 6.1.6 Assignee: Unassigned Attachments:
hibernate-orm-6-test-case.zip Components: hibernate-core Created: 06/Jan/2023 11:49 AM
Environment: DB: HSQLDB (HyperSQL DataBase) Priority: Major Reporter: Marcos Ribes (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63b0372...
)
(Check the attached project. *JPAUnitTestCase*.class)
This query works:
SELECT i, SUM(is.total)
FROM ItemSale is
JOIN is.item i
GROUP BY i
This query however fails:
SELECT NEW Sumary(i, SUM(is.total))
FROM ItemSale is
JOIN is.item i
GROUP BY i
with “expression not in aggregate or GROUP BY columns: I2_0.ID in statement [select
i2_0.id,i2_0.name,sum(i1_0.total) from ItemSale i1_0 join Item i2_0 on
i2_0.id=i1_0.item_id group by i1_0.item_id] “. Also fails with others databases servers
like Postgresql and Oracle (which is SQL standards). This used to work with 5.6.x
branches.
(
https://hibernate.atlassian.net/browse/HHH-15998#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15998#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#100213- sha1:f908df2 )