
public void saveGuest(List<Long> listid) throws HibernateException{ SessionFactory sf=HibernateSessionFactory.getSessionFactory(); System.out.println(listid);
//long ID=0;
try {
session=sf.openSession();
Query qry= session.createQuery("update NewContactVO set guestflag ='y' where id in (:listid) " );
qry.setParameterList("listid", listid);
String m= qry.getQueryString();
System.out.println(m);
int res=qry.executeUpdate();
System.out.println("updated record are"+res);
//transaction=session.beginTransaction();
//transaction.commit();
} catch (Exception e) {
e.printStackTrace();
}
finally{
session.close();
}
}
console============= updated record are2 is showing 2 rows updated but still there is no change in database table HQL plz help