openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gundy99 <rick.gunderso...@gmail.com>
Subject Re: How to ensure Optimistic Locking is working?
Date Sun, 26 Aug 2012 00:22:55 GMT
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.

Mime
View raw message