I would like to update a column, Locked, of all records on a table, say Orders at day end to a specific value "N".
Is there any easy way to implement on hibernate? I don't want to select them first and then loop one by one to set the value and then update/save the value object. e.g.
1. "From OrdersVO o where o.locked = 'Y'"
2. Loop the Collection, change the value
3. Call SaveOrUpdate method
Any way like sql implementation, simply one statement like:
update Orders set Locked = 'N' on Hibernate?
Thanks!
Regards,
Mullin
|