Forums Register Login

How to Write HQL Update query

+Pie Number of slices to send: Send
Dear All,

I have a Class QuestionBank as follows:


How will i write a HQL update query where i want to update the Question bank based on the questionId.

Thank you.
+Pie Number of slices to send: Send
You could use the update syntas of HQL. That is usually only used for bulk updates though. To just update one record you could select by id, update the values in the object and use Hibernate's update API.
New rule: no elephants at the chess tournament. Tiny ads are still okay.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 759 times.
Similar Threads
How to query on Mapping Tables in Hibernate HQL
hibernate inheritence problem
mapping problem and joinColumns
hibernat creating the tables without cascade
mapping a join table with an intermediate entity
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:07:02.