mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-15720 Using multiple select in a multiselect generates java.lang.ArrayIndexOutOfBoundsException
This commit is contained in:
parent
551043a4de
commit
4adafc2757
@ -8258,7 +8258,15 @@ private static int countIndividualSelections(List<? extends SqmAliasedNode<?>> s
|
||||
offset = countIndividualSelections( ( (SqmDynamicInstantiation<?>) selectableNode ).getArguments() ) - 1;
|
||||
}
|
||||
else if ( selectableNode instanceof SqmJpaCompoundSelection<?> ) {
|
||||
offset += ( (SqmJpaCompoundSelection<?>) selectableNode ).getSelectionItems().size() - 1;
|
||||
for ( SqmSelectableNode<?> node : ( (SqmJpaCompoundSelection<?>) selectableNode ).getSelectionItems() ) {
|
||||
if ( node instanceof SqmDynamicInstantiation<?> ) {
|
||||
offset += countIndividualSelections( ( (SqmDynamicInstantiation<?>) node ).getArguments() ) ;
|
||||
}
|
||||
else {
|
||||
offset += 1;
|
||||
}
|
||||
}
|
||||
offset -= 1;
|
||||
}
|
||||
}
|
||||
return offset + selections.size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user