Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZmI0ZGVmNjgz...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16770?atlOrigin=eyJpIjoiZmI0ZG...
) HHH-16770 (
https://hibernate.atlassian.net/browse/HHH-16770?atlOrigin=eyJpIjoiZmI0ZG...
) Entity valued path expansion for GROUP BY clause causes problems for in-subquery
predicates (
https://hibernate.atlassian.net/browse/HHH-16770?atlOrigin=eyJpIjoiZmI0ZG...
)
Issue Type: Bug Assignee: Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) Created: 08/Jun/2023 01:18 AM Priority: Major Reporter: Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
)
This change
https://hibernate.atlassian.net/browse/HHH-16409 introduced entity valued path
expansion for GROUP BY clauses when they were selected.
This is causing problems when the same logic is used for an in-clause subquery predicate.
This is an example HQL that triggers the problem:
select pr from PlatformRelease pr
where pr.unlisted = false
and pr.platformStream.platform.platformType = ' C '
and (pr.platformStream, pr.versionSortable) in
(
select pr2.platformStream, max (pr2.versionSortable) from PlatformRelease pr2
where pr2.platformStream.unlisted = false
and pr2.unlisted = false
group by pr2.platformStream
)
order by pr.versionSortable desc , pr.platformStream.platform.isDefault desc
The error was originally reported in this Quarkus issue:
https://github.com/quarkusio/quarkus/issues/33895.
(
https://hibernate.atlassian.net/browse/HHH-16770#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16770#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#100226- sha1:b8bf2ee )