Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-15530 (
https://hibernate.atlassian.net/browse/HHH-15530?atlOrigin=eyJpIjoiYTQwZD...
)
Re: Lazy loading is not working when @NotFound IGNORE is used (
https://hibernate.atlassian.net/browse/HHH-15530?atlOrigin=eyJpIjoiYTQwZD...
)
Read the updated documentation section about the @NotFound mapping:
https://docs.jboss.org/hibernate/orm/5.6/userguide/html_single/Hibernate_...
(
https://docs.jboss.org/hibernate/orm/5.6/userguide/html_single/Hibernate_...
)
This is a bug fix, as the way this worked before was broken. NotFoundAction.IGNORE simply
can't work with FetchType.LAZY , because in order to ignore a missing target row, the
target row must be joined so that we can see if it exists. NotFoundAction.EXCEPTION is a
way to eagerly throw an exception, but usually, when you use FetchType.LAZY with a broken
FK value and without the @NotFound mapping, you will get an exception when loading that
proxy on first access.
If you want broken proxies that produce an exception on first access, then simply remove
the @NotFound annotation.
(
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 )