[HHH-13319]setParameter doesn't work in native Query if Query is already executed with different parameter value for collection type when new collection length is less than the previous #2814
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When re using a native query with a Collection type param , its not removing the already expanded parameter from parameterBindingMap in expandListValuedParameters. For example first time the Collection had 3 values so it expanded to ids_0 , ids_1, ids_2 . Then next run it has two values so its just updating ids_0 , ids_1 not removing ids_2 from parameterBindingMap which is causing Caused by: org.hibernate.QueryException: Named parameter does not appear in Query: ids_2