Hi friends, Please solve this issue?
For this update querry update TestDB.dbo.MyEmp set empname=? where empid=? i wrote in my DAO class
MyEmployee myEmployee = new MyEmployee();
MyEmployee myEmployee =(MyEmployee )session.load(MyEmployee.class, new Integer(1700)); myEmployee.setName("updatedName"); session.update(myEmployee ); Its working fine, but i need to know for this type of update query mentioned in below
update TestDB.dbo.MyEmp set empsalary=? where empid=? && empname = ? (i.e., i need to update the table by using two conditions in where clause , this can be done by HQL , but i want to know how can we implement this by using saveOrUpdate method..)
How i can do update by using update or saveOrUpdate method()? Whether its possible to do like that in hibernate ???
Please solve this prob...
Thanks in advance....
|