[https://github.com/de313e/SpringEagerLoadingIssue|https://github.com/de313e/SpringEagerLoadingIssue|smart-link]
The above contains the test case to verify the bug
Possible workaround of issue
[https://github.com/de313e/SpringEagerLoadingIssue/pull/2|https://github.com/de313e/SpringEagerLoadingIssue/pull/2|smart-link]
Happens only when the *not owning side* has more than 1 fields mapped with {{@OneToOne}} which are declared as {{LAZY}} but from the owner side they are declared as {{EAGER}}.
In this example the not owning entity of {{User}} has 2 fields mapped with {{@OneToOne}}, namely {{UserSettings}} and {{UserTermsOfUse}} which are declared as {{LAZY}}.
The owning sides of relationship which are {{UserSettings}} and {{UserTermsOfUse}} have a {{EAGER}} relationship with the {{User}} entity. |
|