Description
Jeff Hagen created an issue — 26th January 2010, 16:27:14:
IQuery.SetLockMode() or ICriteria.SetLockMode() are ignored when a filter is enabled.
ayenderahien added a comment — 27th January 2010, 6:12:08:
I can't reproduce, can you provide a failing test case?
Jeff Hagen added a comment — 27th January 2010, 12:57:49:
I'm attaching the simple code I used for testing. When the filter is turned on the following sql is produced:
exec spexecutesql N'select productcat0_.ProductCategoryId as ProductC1_5_, productcat0_.ProductCategoryName as ProductC2_5_ from ProductCategories productcat0_ where productcat0_.CompanyId = @p0 and productcat0.ProductCategoryId=''05000000-F855-6D6E-0849-9D050150E566''',N'@p0 uniqueidentifier',@p0='03000000-078C-B6B3-3BC9-9D05014A1DF9'
When turned off, it produces this:
select productcat0*.ProductCategoryId as ProductC1_5_, productcat0_.ProductCategoryName as ProductC2_5_ from ProductCategories productcat0_ with (updlock, rowlock) where productcat0*.ProductCategoryId='05000000-F855-6D6E-0849-9D050150E566'
The latter sql has the correct wit (updlock, rowlock)