Issue
I am facing this below error :
could not locate named parameter [ ]
My code is
String[] params = {"PARAM1","PARAM2"}
Query query = session.createQuery("select paramValue from Table where paramName in (:PARAMS) order by FIELD (paramName, :PARAMS)");
query.setParameterList(" ", params);
Can anyone help me with this issue?
Solution
You must name the parameter
query.setParameterList("PARAMS", params);
You can see the blank in the error message...
Answered By - Turo
Answer Checked By - Marie Seifert (JavaFixing Admin)