aspose file tools*
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
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