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.
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();
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.