|
Re: Optimistic locking without EclipseLink dependency in my domain objects? [message #386070 is a reply to message #386068] |
Thu, 26 March 2009 14:38 |
|
What does this option do exactly in OpenJPA, I could not find any useful
documentation on it. It seems that it is the default in JPA, so does
nothing?
In JPA to version lock an object you must use the @Version annotation or
orm.xml <version> on a version field in your object. This version will be
checked on any update or delete operation.
The @OptimisticLocking option in EclipseLink allows configuring
field-level optimistic locking, if you do not have a version column. You
can also configure this in EclipseLink's orm.xml, or using a
DescriptorCustomizer or SessionCustomizer you could set this on all of
your descriptors if you so desired.
---
James
http://www.nabble.com/EclipseLink---Users-f26658.html
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.02848 seconds