Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

need help in updating data using hibernate hql  RSS feed

Abhishek Reddy
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!