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 Other Application Frameworks and the fly likes Update statement in Hibernate 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 » Frameworks » Other Application Frameworks
Bookmark "Update statement in Hibernate" Watch "Update statement in Hibernate" New topic
Author

Update statement in Hibernate

Edmund Yong
Ranch Hand

Joined: Nov 16, 2003
Posts: 164
I am using Spring with Hibernate. Is it possible to set the value of a column in all the rows of a table to a specific value, like a plain SQL update statement such as "update sometable set somecolumn='A'"?

Currently I am using HQL to get each row's object, set the field value, and then update the object to the database. I think this way of doing is not very efficient.

Thanks.


SCJP 1.2, SCWCD 1.4
 
jQuery in Action, 3rd edition
 
subject: Update statement in Hibernate
 
It's not a secret anymore!