As seen in http://nhforge.org/blogs/nhibernate/archive/2009/12/17/queryover-in-nh-3-0.aspx, the following code is pretty common when using NHibernate 3 and its QueryOver api:
Cat catAlias = null;
Kitten kittenAlias = null;
IQueryOver<Cat,Cat> catQuery =
session.QueryOver<Cat>(() => catAlias)
.JoinAlias(() => catAlias.Kittens, () => kittenAlias)
.Where(() => catAlias.Age > 5)
.And(() => kittenAlias.Name == "Tiddles");
In cases like these RS warns for both ConditionIsAlwaysTrueOrFalse as well as PossibleNullReferenceException .
To avoid having to sprinkle "// ReSharper disable ..." all over the place, is there any way to make RS understand these cases are safe (e.g. by somehow not warn when we pass in labmda expressions) not warn all the time for it?
If not, plans to "fix" these issues in future releases?