Finn (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzgzNDZiZWE5...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16555?atlOrigin=eyJpIjoiMzgzND...
) HHH-16555 (
https://hibernate.atlassian.net/browse/HHH-16555?atlOrigin=eyJpIjoiMzgzND...
) Join fetch query in combination with the inheritance pattern not working in hibernate 6
(
https://hibernate.atlassian.net/browse/HHH-16555?atlOrigin=eyJpIjoiMzgzND...
)
Issue Type: Bug Affects Versions: 6.2.2 Assignee: Unassigned Attachments:
HibernateTicket.png Components: query-hql Created: 05/May/2023 01:20 AM Priority: Major
Reporter: Finn (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
)
I’m using the following entity structure with the inheritance pattern.
(
https://hibernate.atlassian.net/secure/attachment/50339/50339_HibernateTi... )
I want so select all *animals* and load all *kittens* as well if the animal is a cat.
I’m using the following query to load alls animals.
select animal from Animal animal left join fetch animal.kittens
In Hibernate 5 all *kittens* are loaded as expected. After the upgrade to hibernate 6 I
get a *LazyInitializationException* on accessing the *kittens*
Testcase
https://github.com/finn0s/hibernate-test-case-templates
(
https://hibernate.atlassian.net/browse/HHH-16555#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16555#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:f83bc8f )