File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
hibernate-core/src/main/java/org/hibernate/sql/results/graph/collection/internal Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -121,10 +121,13 @@ protected void resolveInstanceSubInitializers(ImmediateCollectionInitializerData
121121 final Initializer <?> initializer = elementAssembler .getInitializer ();
122122 if ( initializer != null ) {
123123 final RowProcessingState rowProcessingState = data .getRowProcessingState ();
124- final Integer index = listIndexAssembler .assemble ( rowProcessingState );
124+ Integer index = listIndexAssembler .assemble ( rowProcessingState );
125125 if ( index != null ) {
126126 final PersistentList <?> list = getCollectionInstance ( data );
127127 assert list != null ;
128+ if ( listIndexBase != 0 ) {
129+ index -= listIndexBase ;
130+ }
128131 initializer .resolveInstance ( list .get ( index ), rowProcessingState );
129132 }
130133 }
You can’t perform that action at this time.
0 commit comments