Hibernate version:3.rc
Code:
Session session = AS400Session.currentSession();
Query sql = null;
if(criteria.equals("CODICE"))
sql=session.createQuery("Select ay.matema,ay.de30ma, from MaterialiVO as ay where ay.clmama=? and ay.matema like '?' and ay.strema='' ");
else
sql=session.createQuery("Select ay.matema,ay.de30ma, from MaterialiVO as ay where ay.clmama=? and ay.de30ma like '?' and ay.strema='' ");
sql.setString(0,cdc_classe);
sql.setString(1,"'"+params+"%'");
Hibenrate throws this error
Positional parameter does not exist: 1 in query:
Can you help me please
Devis