There is an open bug (NH-2400) regarding the fact that the NHibernate
3.0 LINQ provider does not work correctly for empty collections when
creating an IN query, e.g.

session.Query<Foo>().Where(x => someIds.Contains(x.Id));

and "someIds" is empty. This leads to the exception "An empty
parameter-list generate wrong SQL; parameter name 'p1'".

We are currently moving from NHibernate 2.x to 3.0 GA and find that
this very bug causes us a lot of headache! We use such where
statements all over the place and it worked just fine with the LINQ
provider for NH 2.x.

Is there a fix available or a work around without us having to
refactor all our code...?
If no fix or workaround is available, then can somebody with a more
intimate knowledge of the LINQ provider give a hint where I would have
to go to change the code.

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

Reply via email to