This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes need help in updating data using hibernate hql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "need help in updating data using hibernate hql" Watch "need help in updating data using hibernate hql" New topic
Author

need help in updating data using hibernate hql

Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
I have a table let us say userdetails with fields companyid,employeeid,password,empname etc
here companyid,employeeid are composite keys and employeeid can be editable

i have created the required hibernate pojo class fro this table...

how to write update query for updating employeeid in the database?

for example ,

update userdetails set employeeid='new_value' where companyid='some_company' and employeeid='old_value'

i can do this by using SQLQuery object.....

how can i do this using hql?


Abhishek
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help in updating data using hibernate hql
 
It's not a secret anymore!