We have an AssetAttributeValue entity which gets frequent updates (1.5 updates per second). AssetAttributeValue has a AssetAttribute property. Relationship between AssetAttributeValue and AssetAttribute is ManyToOne(fetch = FetchType.LAZY). AssetAttribute has a Provision property. Relationship between AssetAttribute and Provision is ManyToMany.
Updates on AssetAttributeValue updates version field of Provision. We are not completely sure about this but version update of Provision seems to happen when an AssetAttribute instance is related to more than one Provision. Normally this would not pose a problem but in our application multiple threads update AssetAttributeValue and because of version difference of Provision we get optimistic lock exception. Can anyone shed a light on this behavior. In such a entity model when should we expect the Provision number to be updated? Can we prevent this update? Any other advise would be welcome. -- View this message in context: http://openjpa.208410.n2.nabble.com/version-field-updated-indirectly-tp5838027p5838027.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
