a clause where 1 = 0 allow it to be ORing with other condition (this is how
the Criteria doing it in NH currently, so that's where I got the idea from)
Though I have a vague idea that It should translate to something "false"
rather than throw. After all, a condition where doing a contains with an
empty collection will always return false.


On Sun, Oct 31, 2010 at 6:27 AM, Fabio Maulo <[email protected]> wrote:

> 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]>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]>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