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