From: <pa...@us...> - 2011-04-21 03:42:21
|
Revision: 5731 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5731&view=rev Author: patearl Date: 2011-04-21 03:42:15 +0000 (Thu, 21 Apr 2011) Log Message: ----------- Linq: Handle methods that return true or false when provided with null. (NH-2583 again) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Linq/Visitors/WhereJoinDetector.cs Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/WhereJoinDetector.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/WhereJoinDetector.cs 2011-04-20 21:59:24 UTC (rev 5730) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/WhereJoinDetector.cs 2011-04-21 03:42:15 UTC (rev 5731) @@ -302,8 +302,9 @@ { if (addOwnMemberExpressionMapping) { - // Same mapping as the not-null (in)equality clause in VisitBinaryExpression. - FixedMapping(_memberExpressionMappings.Peek(), _collectedPathMemberExpressionsInExpressions.Pop(), N); + // We would often get the same mapping as the not-null (in)equality clause in VisitBinaryExpression. + // However, it's possible a method call will convert the null value from the failed join into any one of True, False, or Null. + FixedMapping(_memberExpressionMappings.Peek(), _collectedPathMemberExpressionsInExpressions.Pop(), TNF); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |