Skip to content

Commit

Permalink
HHH-18771: If positive, substract listIndexBase from index
Browse files Browse the repository at this point in the history
  • Loading branch information
Selaron committed Oct 25, 2024
1 parent c8e01e0 commit df05eb2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ protected void resolveInstanceSubInitializers(ImmediateCollectionInitializerData
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 );
}
}
Expand Down

0 comments on commit df05eb2

Please sign in to comment.