Use FetchMode.Join to load OneToOne associations that have the same AssociationKey as the entity owner

Description

The fix for (correctly) changed the AssociationKey for a one-to-one association to be the same as the AssociationKey of the parent entity while building load plans. Hibernate incorrectly assumes that the one-to-one association is a duplicate association. As a result, Hibernate uses FetchMode.SELECT to load the one-to-one association.

This issue will deal with this special case where the parent entity is the EntityReturn. It will change the association back to use FetchMode.JOIN.

Environment

None

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure