mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-07 19:58:16 +00:00
HHH-10993 : NPE when Lazy loading collection without transaction for bytecode enhanced entitie
(cherry picked from commit 2c553f3290f01c6eeb3e2b75d89428e9b99712e3)
This commit is contained in:
parent
43134abdd0
commit
f8243a6007
@ -335,11 +335,14 @@ public Object getLoadedValue(String propertyName) {
|
||||
|
||||
@Override
|
||||
public void overwriteLoadedStateCollectionValue(String propertyName, PersistentCollection collection) {
|
||||
assert propertyName != null;
|
||||
assert loadedState != null;
|
||||
// nothing to do if status is READ_ONLY
|
||||
if ( getStatus() != Status.READ_ONLY ) {
|
||||
assert propertyName != null;
|
||||
assert loadedState != null;
|
||||
|
||||
final int propertyIndex = ( (UniqueKeyLoadable) persister ).getPropertyIndex( propertyName );
|
||||
loadedState[propertyIndex] = collection;
|
||||
final int propertyIndex = ( (UniqueKeyLoadable) persister ).getPropertyIndex( propertyName );
|
||||
loadedState[propertyIndex] = collection;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user