How To Use Setparameter In Hibernate
I want to search all employees with the corresponding ids stored in the serialNumberList and add all their hours together. serialNumberList is a string containing the ids separated
Solution 1:
You need to fix the following:
Your search criteria should be pde.serialNumberIN(:serialNumberList)
You need to change the parameter serial number to list and use:
setParameterList("serialNumberList", serialNumberList)
Solution 2:
I change the String to String[] so that I could use setParameterList() as said by YuVi-san
Solution 3:
In addition to @YuVi's answer with IN, you also have to pass the list as an actual List, not a String.
Post a Comment for "How To Use Setparameter In Hibernate"