Colour me red, I was forgetting the setter (my bad for reading the @Version
javadoc literally and only applying what I saw there.
The following will indeed enable optimistic locking for an entity:
private long version;
@Version
public long getVersion() {
return this.version;
}
private long setVersion( long version ) {
this.version = version;
}
--
View this message in context:
http://openjpa.208410.n2.nabble.com/How-to-ensure-Optimistic-Locking-is-working-tp7580915p7580945.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.