The fact that emptyCollection.Contains (entity.Name) creates an invalid SQL 
command is a bug. Converting this to 1=0 was just a suggestion I guess.

Cheers,
Stefan

From: [email protected] 
[mailto:[email protected]] On Behalf Of Fabio Maulo
Sent: Sunday, October 31, 2010 12:27 PM
To: [email protected]
Subject: Re: [nhibernate-development] Re: Is this behavior by design? If so is 
there are recommended workout?

And the sense to run a query to DB with a clause "where 1 = 0" is ?
a bug in NH... obviously.
On Sat, Oct 30, 2010 at 10:47 PM, Hoang Tang 
<[email protected]<mailto:[email protected]>> wrote:
Using Criteria seem to give the correct result... so this is definitely a bug

a criteria that doing a contains with an empty collection should be translated 
to false... ie
where 1 = 0;

On Sat, Oct 30, 2010 at 8:39 PM, Hoang Tang 
<[email protected]<mailto:[email protected]>> wrote:
Recently I filled this Jira http://216.121.112.228/browse/NH-2400 which a Linq 
query failed with using Contains with an empty collection

Shortly after after some more testing I found out that I got the same error 
using HQL which lead me to believe this might be by design?

If so what happen if there are multiple ORing criteria and this is one of them.




--
Fabio Maulo

Reply via email to