I don't think it is an intended side effect, but with the fix for HHH-9460, which always sets the foreign key type to ForeignKeyDirection.TO_PARENT if the type references the primary key,
OneToOneType.isNullable() will return true, which then causes LoadEventListener.INTERNAL_LOAD_NULLABLE to be used rather than LoadEventListener.INTERNAL_LOAD_LAZY. This effectively prevents lazy loading to be used with non-optional/constrained OneToOne relations.
Testcase: https://github.com/hibernate/hibernate-orm/pull/2474
, , sorry for the delay on fixing this, but I believe that the fix will cause regressions for applications that use @NotFound( IGNORE ). I'm actively in process of sorting those out. Once those are fixed, this issue will be fixed.
Hi Gail, thanks for picking this up again. If there's any way I can help, please let me know. I'd really like to see this issue resolved the sooner the better
Thanks again!
, I created a new PR for HHH-12436. It should fix this issue. Please give it a try and let me know if it does. Thanks!
Hi Gail! Thanks for looking into HHH-12436. It does not yet resolve this issue. I've left a comment on your PR why I am sure this is the case. I've rebased my branch upon yours so that we can hopefully combine the two.
Fixed in master. , thanks for your work on this!