I saw this issue severeal times in the list, and i think it might be fixed in the trunk.
http://216.121.112.228/browse/NH-2540 2011/4/3 Krzysztof Kozmic <[email protected]> > I'm on NHibernate 3.1 and I noticed something interesting: > > I have a property IsQuoteOnly on one of the entities that is mapped as > YesNo to Oracle database. > > Now I have a LINQ Query that has in it > > .Where(x => x.IsQuoteOnly == false) > > that generates > > where /* other conditions */ > and case > when foo.IS_QUOTE_ONLY = 'Y' then 1 > else 0 > end = case > when 0 /* :p2 */ = 1 then 1 > else 0 > end > > If I change that query to > > .Where(x => !x.IsQuoteOnly) > > I get more predictable > > where /* other conditions */ > and not (foo.IS_QUOTE_ONLY = 'Y') > > They both are correct and both return the same result. I just find the > first one unnecessarily unreadable and it should IMO be > > where /* other conditions */ > and foo.IS_QUOTE_ONLY = 'N' > > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
