A followup from a conversation with Sanne.
What you essentially ask is the ability to have different locking strategies across a single hierarchy. Mixing pessimistic strategy and optimistic strategy.
Interestingly, you cannot decide that a superclass has optimistic locking (and thus a version property) and in a subclass deny that and only allow pessimistic locking. That would be against the Liskov substitution principe as the version is a state of the superclass. But what you ask would allow to go from a pessimistic superclass to an optimistic subclass.
It feels wrong to allow one way and not the other. It also feels wrong to relax the locking from pessimistic to optimistic too. To me at least 
The fact that optimistic locking based on version means adding a state on the class confuses things.
|