Jiayin Mao (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5b4e4c5...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWQ1NGQ5MjM5...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15530?atlOrigin=eyJpIjoiNWQ1NG...
) HHH-15530 (
https://hibernate.atlassian.net/browse/HHH-15530?atlOrigin=eyJpIjoiNWQ1NG...
) Lazy loading is not working when @NotFound IGNORE is used (
https://hibernate.atlassian.net/browse/HHH-15530?atlOrigin=eyJpIjoiNWQ1NG...
)
Issue Type: Bug Affects Versions: 5.6.6 Assignee: Unassigned Components: hibernate-core
Created: 19/Sep/2022 18:34 PM Priority: Blocker Reporter: Jiayin Mao (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5b4e4c5...
)
In our application we are using @ManyToMany(fetch = FetchType.LAZY) on an association and
we are also using @NotFound(action = NotFoundAction.IGNORE) since there are some
non-existing referenced objects in the database. After upgrading to 5.6.6, the associated
objects are eagerly loaded, causing the corresponding feature to be slowed down by 500 to
1000 times.
This behavior change seems to be caused by the fix of
https://hibernate.atlassian.net/browse/HHH-15060 (
https://hibernate.atlassian.net/browse/HHH-15060 ) , in which lazy load is disabled when
@NotFound is specified (source here (
https://github.com/hibernate/hibernate-orm/blob/64272ba56173c5a723353741e...
) ).
Due to the limit of existing data we have to NotFoundAction.IGNORE so this is a blocking
issue for us.
(
https://hibernate.atlassian.net/browse/HHH-15530#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15530#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#100207- sha1:866f7d8 )