HHH-18771: If positive, substract listIndexBase from index
This commit is contained in:
parent
b5302f31e5
commit
b8dc72ccb2
|
@ -121,10 +121,13 @@ public class ListInitializer extends AbstractImmediateCollectionInitializer<Abst
|
|||
final Initializer<?> initializer = elementAssembler.getInitializer();
|
||||
if ( initializer != null ) {
|
||||
final RowProcessingState rowProcessingState = data.getRowProcessingState();
|
||||
final Integer index = listIndexAssembler.assemble( rowProcessingState );
|
||||
Integer index = listIndexAssembler.assemble( rowProcessingState );
|
||||
if ( index != null ) {
|
||||
final PersistentList<?> list = getCollectionInstance( data );
|
||||
assert list != null;
|
||||
if ( listIndexBase != 0 ) {
|
||||
index -= listIndexBase;
|
||||
}
|
||||
initializer.resolveInstance( list.get( index ), rowProcessingState );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue