Hi There,
I changed my namedQuery to use named parameters like
select t.x, t.y from table t
where t.description =
escription
and t.types in (:typesList)
Query query = session.getNamedQuery(queryName);
String[] paramNames = query.getNamedParameters();
if(args.length == paramNames.length) {
for(int i = 0; i < paramNames.length; i++) {
if(paramNames[i].endsWith("List")) {
query.setParameterList(paramNames[i], (List)args[i]);
}else {
query.setParameter(paramNames[i], args[i]);
}
}
where args is an Object[] of the values that I need to bind to the namedParameters in the order in which it is laid out in the Named Query