I am working on JSF
application in which i am using Hibernate as ORM mapping tool.
Problem :
I am using MySQL
as database , so i am adding the data's into Mysql
through hibernate.
Now i am trying to update a database value from bean class
When i trying to update it the query will execute successfully but the values updated values will not added in database
My Bean class Code :
Session session=HibernateUtil.getSessionFactory().openSession();
Query hQuery=session.createQuery("update Record set status='Present' where refId=100");
System.out.println("Result : "+hQuery.executeUpdate());
The above code is to update the database values from table "record", Its showing no error in output but values are not updated in database.
Hibernate : update sample.record set Status='Present' where RefId=100
Result : 9
In above result displayed in console, for showSql
Any suggestions would be really appreciated...