I can confirm that this fail. I think it fail when using QueryOver as well.
I'll cross post this on the dev mailing list.
Consider three of the following test:
[Test]
public void UsersWithListContains()
{
var names = new List<string> { "ayende", "rahien" };
var query = (from user in db.Users
where names.Contains(user.Name)
select user).ToList();
Assert.AreEqual(2, query.Count);
}
[Test]
public void UsersWithIListContains()
{
IList<string> names = new List<string> { "ayende", "rahien" };
var query = (from user in db.Users
where names.Contains(user.Name)
select user).ToList();
Assert.AreEqual(2, query.Count);
}
[Test]
public void UsersWithICollectionContains()
{
ICollection<string> names = new List<string> { "ayende",
"rahien" };
var query = (from user in db.Users
where names.Contains(user.Name)
select user).ToList();
Assert.AreEqual(2, query.Count);
}
the first one will pass while the second two will fail (On the trunk rev
5160). The first test is a copy from the NHibernate test set for Linq.
(Under Where Test)
the only thing I changed is from var which is List<string> to
ICollection<string> and IList<string>
On Sun, Aug 8, 2010 at 5:30 PM, John Davidson <[email protected]> wrote:
> The login is for the NHForge community site and you can self-register if
> not already registered. Unfortunately gmail will not allow the attachment in
> an email.
>
> John Davidson
>
>
> On Sun, Aug 8, 2010 at 5:55 PM, Valeriu Caraulean <[email protected]>wrote:
>
>> 1. your link is asking for login
>> 2. your verses are nice
>> 3. your aplomb is always here
>> 4. we're really appreciating your contribution to NH
>>
>> Cheers
>>
>> On Sun, Aug 8, 2010 at 4:50 PM, Fabio Maulo <[email protected]> wrote:
>>
>>> On Sat, Aug 7, 2010 at 8:20 PM, Valeriu Caraulean
>>> <[email protected]>wrote:
>>>
>>>> >Too many words and we still waiting a test
>>>>
>>>> After all, I'm just too lazy to write that test...
>>>>
>>>>
>>> To write a test for NH that can then easy used by the team to find out a
>>> fix, you don't have to check-out the full source.
>>> http://nhforge.org/media/p/70.aspx
>>>
>>> The quality is not achieved by chance.
>>>
>>> Somebody could help.
>>> Nobody must help.
>>> Somebody can help.
>>> Somebody helps.
>>> Many talk about what somebody else should do.
>>>
>>> --
>>> Fabio Maulo
>>>
>>> --
>>> 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]<nhusers%[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]<nhusers%[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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>