HHH-16960 OneToOne lazy loading fails when fetch graph is involved
This commit is contained in:
parent
a73bc08c78
commit
6c690f561c
|
@ -1630,9 +1630,12 @@ public class ToOneAttributeMapping
|
|||
final boolean selectByUniqueKey = isSelectByUniqueKey( side );
|
||||
|
||||
// Consider all associations annotated with @NotFound as EAGER
|
||||
// and LAZY one-to-one that are not instrumented and not optional
|
||||
if ( fetchTiming == FetchTiming.IMMEDIATE
|
||||
|| hasNotFoundAction()
|
||||
|| getAssociatedEntityMappingType().getSoftDeleteMapping() != null ) {
|
||||
|| getAssociatedEntityMappingType().getSoftDeleteMapping() != null
|
||||
|| ( !entityMappingType.getEntityPersister().isInstrumented()
|
||||
&& cardinality == Cardinality.ONE_TO_ONE && isOptional ) ) {
|
||||
return buildEntityFetchSelect(
|
||||
fetchParent,
|
||||
this,
|
||||
|
|
Loading…
Reference in New Issue