File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Object Relational Mapping
when we update in hibernate will it always fire select query before updating
reddy kumar pavan
Joined: Jul 01, 2007
Jul 11, 2008 06:39:00
I have one doubt in hibernate When i update any record in the database will it always fire select query first and then fire update query or if not in what cases will it fire select and then update.
Please let me know.
Thanks in advance.
Joined: Apr 14, 2004
Jul 11, 2008 07:24:00
Are you using Hibernate's optimistic locking mechanism? It needs to check the version has not changed before updated. There is no way round this, its part of the optimistic locking
I agree. Here's the link:
subject: when we update in hibernate will it always fire select query before updating
"merge" and "persist" query
Hibernate Automatic Versioning
Batch update in EJB3
question on Hibernate version property again
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015