Future queries fail when using Contains()

22 views
Skip to first unread message

Chris B

unread,
May 24, 2012, 12:04:40 PM5/24/12
to nhu...@googlegroups.com
I believe this is a bug, but wanted to ask here before posting an official issue in the JIRA.

I am trying to run a query like this:

using (var session = OpenSession())
            {
                var idsICareAbout = new[] { 1, 2, 10 };

                var results = from e in session.Query<Entity>()
                              where idsICareAbout.Contains(e.Id)
                              select e;

                var read = results.ToFuture().ToList();
            }

which I expect generate SQL similar to SELECT ... FROM Entity WHERE Id IN (1, 2, 10).

NH currently throws a KeyNotFoundException, but works correctly if ".ToFuture()" is removed.  I have some test cases I can submit, but just wanted to confirm this as a bug before doing so. I also did some searching on the JIRA, but didn't find anything that sounded applicable.

Thanks!

Alexander I. Zaytsev

unread,
May 26, 2012, 12:52:34 PM5/26/12
to nhu...@googlegroups.com
Yea, this is a bug, and there is issue in JIRA already:  https://nhibernate.jira.com/browse/NH-2897 

четверг, 24 мая 2012 г., 22:04:40 UTC+6 пользователь Chris B написал:
Reply all
Reply to author
Forward
0 new messages