HHH-10993 : NPE when Lazy loading collection without transaction for bytecode enhanced entitie
This commit is contained in:
parent
41ac8c4f08
commit
2c553f3290
|
@ -323,11 +323,14 @@ public abstract class AbstractEntityEntry implements Serializable, EntityEntry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void overwriteLoadedStateCollectionValue(String propertyName, PersistentCollection collection) {
|
public void overwriteLoadedStateCollectionValue(String propertyName, PersistentCollection collection) {
|
||||||
assert propertyName != null;
|
// nothing to do if status is READ_ONLY
|
||||||
assert loadedState != null;
|
if ( getStatus() != Status.READ_ONLY ) {
|
||||||
|
assert propertyName != null;
|
||||||
|
assert loadedState != null;
|
||||||
|
|
||||||
final int propertyIndex = ( (UniqueKeyLoadable) persister ).getPropertyIndex( propertyName );
|
final int propertyIndex = ( (UniqueKeyLoadable) persister ).getPropertyIndex( propertyName );
|
||||||
loadedState[propertyIndex] = collection;
|
loadedState[propertyIndex] = collection;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue