Fix StateleSession call to PostLoadEvent causing NPE
This commit is contained in:
parent
78b8b4aed8
commit
4eb27e61b1
|
@ -192,14 +192,16 @@ public class JdbcValuesSourceProcessingStateStandardImpl implements JdbcValuesSo
|
||||||
|
|
||||||
loadingEntityMap.forEach(
|
loadingEntityMap.forEach(
|
||||||
(entityKey, loadingEntityEntry) -> {
|
(entityKey, loadingEntityEntry) -> {
|
||||||
|
if ( postLoadEvent != null ) {
|
||||||
postLoadEvent.reset();
|
postLoadEvent.reset();
|
||||||
postLoadEvent.setEntity( loadingEntityEntry.getEntityInstance() )
|
postLoadEvent.setEntity( loadingEntityEntry.getEntityInstance() )
|
||||||
.setId( entityKey.getIdentifier() )
|
.setId( entityKey.getIdentifier() )
|
||||||
.setPersister( loadingEntityEntry.getDescriptor() );
|
.setPersister( loadingEntityEntry.getDescriptor() );
|
||||||
|
|
||||||
for ( PostLoadEventListener listener : listenerGroup.listeners() ) {
|
for ( PostLoadEventListener listener : listenerGroup.listeners() ) {
|
||||||
listener.onPostLoad( postLoadEvent );
|
listener.onPostLoad( postLoadEvent );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
executionContext.invokeAfterLoadActions(
|
executionContext.invokeAfterLoadActions(
|
||||||
getSession(),
|
getSession(),
|
||||||
loadingEntityEntry.getEntityInstance(),
|
loadingEntityEntry.getEntityInstance(),
|
||||||
|
|
Loading…
Reference in New Issue