[hibernate-dev] *-to-one associations and @NotFound

Gail Badner gbadner at redhat.com
Mon Sep 24 19:03:49 EDT 2018


As a result of fixing HHH-12436
<https://hibernate.atlassian.net/browse/HHH-12436>, some eager *-to-one
associations that were loaded using FetchMode.JOIN may instead be loaded
using FetchMode.SELECT, and vice-versa. In some cases, @NotFound behavior
is different depending on the FetchMode for the association.


The reason why FetchMode may change due to HHH-12436
<https://hibernate.atlassian.net/browse/HHH-12436> is that the
ForeignKeyDirection of some *-to-one associations were incorrect.
Correcting the ForeignKeyDirection will result in a different
AssociationKey, which may ultimately affect the FetchMode Hibernate assigns
to an association.


My hope is to resolve the inconsistencies before fixing HHH-12436
<https://hibernate.atlassian.net/browse/HHH-12436>, so it does not result
in a change in application behavior.


I've created a Google Doc to document the inconsistencies and to make it
easier to discuss how to go about resolving them:

https://docs.google.com/document/d/1o3Q6tYD5jjxC6Ok7vBYzxRGsixpG46p-5zDiDCAKLsI/


Please feel free to request access to the document if you wish to review or
add comments.


Regards,

Gail


More information about the hibernate-dev mailing list