I said:

> [Test]
> public void NullComparsonTests()
> {
>       using(DataAccessAdapter adapter = new DataAccessAdapter())
>       {
>               LinqMetaData metaData = new LinqMetaData(adapter);
>               var q = from o in metaData.Order
>                        where o.ShippedDate == null
>                        select o;
> 
>               var count = 0;
>               foreach(var v in q)
>               {
>                       count++;
>               }
>               Assert.AreEqual(19, count);
> 
>               DateTime? nullValue = null;
>               var q2 = from o in metaData.Order
>                         where o.ShippedDate == nullValue
>                         select o;
>               count = 0;
>               foreach(var v in q)
>               {
>                       count++;
>               }
>               Assert.AreEqual(19, count);
>       }
> }
> 
> works, give exactly the same query, with an IS NULL predicate. I think NH
> should do that too, it is what the developer asked for. (I count in a loop
> btw, to prevent the appending of the scalar count to the query for
testing)

        One could spot a copy/paste bug in the query above, I re-used 'q'
instead of enumerating 'q2' and assume the results were due to that, but
*pfew* updating the test gives the same result, so just for
clarity/completeness, the second foreach(var v in q) has to be foreach(var v
in q2) 

                FB

Reply via email to