| The problem is 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 |