Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Update statement in Hibernate  RSS feed

 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!