Bjørn Hilstad (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiN2JiMWQ2ZTU0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16719?atlOrigin=eyJpIjoiN2JiMW...
) HHH-16719 (
https://hibernate.atlassian.net/browse/HHH-16719?atlOrigin=eyJpIjoiN2JiMW...
) Upgrading from 6.1.7.Final to 6.2.2.Final breaks Criteria queries for model with
inheritance (
https://hibernate.atlassian.net/browse/HHH-16719?atlOrigin=eyJpIjoiN2JiMW...
)
Issue Type: Bug Affects Versions: 6.2.2, 6.2.3 Assignee: Unassigned Attachments:
hibernate-bug2.zip Components: hibernate-core Created: 30/May/2023 07:37 AM Priority:
Major Reporter: Bjørn Hilstad (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
Error message:
Cannot invoke
"org.hibernate.sql.ast.tree.from.TableGroup.findTableGroupJoin(org.hibernate.sql.ast.tree.from.TableGroup)"
because "parentParentTableGroup" is null
java.lang.NullPointerException: Cannot invoke
"org.hibernate.sql.ast.tree.from.TableGroup.findTableGroupJoin(org.hibernate.sql.ast.tree.from.TableGroup)"
because "parentParentTableGroup" is null
Discovered while upgrading a spring-boot+jpa app from 3.0.7 to 3.1.0, which upgrades
Hibernate from 6.1.7 to 6.2.2.
See testcase H8BugTest for a reproducer (the project also contains ways to trigger this
from a spring-boot app, but the mentioned one should be good enough).
The testcase findStreet which uses a CriteriaQuery to fetch a Street works on all
versions.
The testcase findAddress which uses a CriteriaQuery to fetch an Address breaks on 6.2.2+,
but works on 6.1.7. Address has a simple use of inheritance, which seems to be the trigger
of the problem.
Versions of Hibernate to use can be controlled from gradle.properties. hibernate-bug2.zip
(
https://hibernate.atlassian.net/rest/api/3/attachment/content/50424 )
(
https://hibernate.atlassian.net/browse/HHH-16719#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16719#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#100225- sha1:d82e018 )