views:

14

answers:

0

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:

SELECT * FROM DerivedClass this_ with (updlock, rowlock) inner join [BaseClass] this_1_ on this_.Id=this_1_.Id WHERE ...

This is the same situation described in http://opensource.atlassian.com/projects/hibernate/browse/HHH-2392

If anyone could point me in the right direction it would be much appreciated.