Consolidate common functionality of ICriteria, IQuery, ISQLQuery, etc

Description

There are so many common functions across several interfaces, such as SetCacheable, SetCacheRegion, SetResultTransformer, etc that it would make sense to consolidate the common functionality into a root interface that ICriteria, IQuery, ISqlQuery, etc derive from. That way, we can handle caching / transformation / etc options in a more general way instead of having to handle it per interface.

Environment

None

Activity

Show:

Peter Schojer September 25, 2015 at 8:55 AM

the SetLockMode implementation fails with any converter:
System.InvalidOperationException: could not locate alias to apply lock mode : e
at NHibernate.Loader.Hql.QueryLoader.ApplyLocks(SqlString sql, IDictionary`2 lockModes, Dialect dialect) in c:\TFS\NHibernate-4.0.4.GA-src\src\NHibernate\Loader\Hql\QueryLoader.cs:line 82

Simply change test to:
[Test]
public void CanSetLockLinqQueries()
{
var result = (from e in db.Customers
where e.CompanyName == "Corp"
select e.CustomerId).SetLockMode(LockMode.Upgrade).ToList();

}

Ricardo Peres November 20, 2014 at 5:35 PM

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?

Created March 17, 2010 at 9:01 AM
Updated October 12, 2017 at 11:20 AM
Who's Looking?