[ http://216.121.112.228/browse/NH-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20917#action_20917 ]
Lee Timmins commented on NH-2654:
---------------------------------
Thanks for fixing this so quickly. I hope this fix also addresses the following aswell:
[TestMethod]
public void Where_Any() {
var result = _session.Query<Post>()
.Where(p => p.Comments.Any(c => c.IsSpam))
.ToList();
Assert.AreEqual(2, result.Count); // My test runner reports that there are actually 0 results but there should be 2
}
It is similar to the above except that Any is used within a Where clause.
> Any Doesn't Work
> ----------------
>
> Key: NH-2654
> URL: http://216.121.112.228/browse/NH-2654
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.1.0
> Reporter: Lee Timmins
> Priority: Major
>
> I have created my own basic blog application. For testing i have pre-populated some data such that every post contains atleast one comment (one to many relationship from Post to Comment). I have the following test:
> [TestMethod]
> public void Any() {
> var result = _session.Query<Post>()
> .Any(p => p.Comments.Count == 0);
> Assert.IsFalse(result);
> }
> However this test fails where as in version 2 (changing Query to Linq) it worked fine.
> I'd appreciate if this could be solved quickly as this is stopping me from upgrading. Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|