Avoid NPE when resolving collection key for delayed collections
This commit is contained in:
parent
71f633a8f7
commit
44719e9bb2
|
@ -76,7 +76,9 @@ public class DelayedCollectionInitializer extends AbstractCollectionInitializer
|
||||||
// LoggingHelper.toLoggableString( getNavigablePath(), this.collectionKey.getKey() )
|
// LoggingHelper.toLoggableString( getNavigablePath(), this.collectionKey.getKey() )
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
parentAccess.registerResolutionListener( owner -> collectionInstance.setOwner( owner ) );
|
if ( collectionInstance != null ) {
|
||||||
|
parentAccess.registerResolutionListener( owner -> collectionInstance.setOwner( owner ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final Object parentKey = parentAccess.getParentKey();
|
final Object parentKey = parentAccess.getParentKey();
|
||||||
|
@ -85,7 +87,9 @@ public class DelayedCollectionInitializer extends AbstractCollectionInitializer
|
||||||
collectionAttributeMapping.getCollectionDescriptor(),
|
collectionAttributeMapping.getCollectionDescriptor(),
|
||||||
parentKey
|
parentKey
|
||||||
);
|
);
|
||||||
parentAccess.registerResolutionListener( owner -> collectionInstance.setOwner( owner ) );
|
if ( collectionInstance != null ) {
|
||||||
|
parentAccess.registerResolutionListener( owner -> collectionInstance.setOwner( owner ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue