LockMode With Subclasses
- by Lester
I'm using Fluent Nhibernate with the following query on DerivedClass which extends BaseClass:
var query = Session.CreateCriteria<DerivedClass>().SetLockMode(LockMode.Upgrade)
What I want is the lock hints (updlock, rowlock) to be applied to both DerivedClass and BaseClass, but the generated SQL only applies the lock hints to DerivedClass:
…