• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help in updating data using hibernate hql

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic