HHH-14874 Lazy loading of basic attributes in different @LazyGroups throws ArrayIndexOutOfBoundsException
This commit is contained in:
parent
3b47b85ce8
commit
4323f9f011
|
@ -1651,6 +1651,7 @@ public abstract class AbstractEntityPersister
|
|||
try {
|
||||
Object result = null;
|
||||
final Object[] values = lazySelect.load( id, session );
|
||||
int i = 0;
|
||||
for ( LazyAttributeDescriptor fetchGroupAttributeDescriptor : fetchGroupAttributeDescriptors ) {
|
||||
final boolean previousInitialized = initializedLazyAttributeNames.contains( fetchGroupAttributeDescriptor.getName() );
|
||||
|
||||
|
@ -1666,11 +1667,11 @@ public abstract class AbstractEntityPersister
|
|||
// of course that would mean a new method on SelfDirtinessTracker to allow un-marking
|
||||
|
||||
// its already been initialized (e.g. by a write) so we don't want to overwrite
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
final Object selectedValue = values[fetchGroupAttributeDescriptor.getLazyIndex()];
|
||||
final Object selectedValue = values[i++];
|
||||
|
||||
final boolean set = initializeLazyProperty(
|
||||
fieldName,
|
||||
|
|
Loading…
Reference in New Issue