[CSHARP-653] Query.Or should return { } if any subquery is { } Created: 21/Dec/12  Updated: 20/Mar/14  Resolved: 03/Jan/13

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.7
Fix Version/s: 1.8

Type: Bug Priority: Major - P3
Reporter: Joe Enzminger Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: linq, linq,query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File MongoTests.cs    

 Description   

[Robert Stam edited the summary 2013-01-02]

See attached test (TestMethod2)

int count = (from e in collection.AsQueryable<Entity>()
where true || e.Name == "Name_22"
select e).Count();

returns 1 record, 100 expected



 Comments   
Comment by auto [ 02/Jan/13 ]

Author:

{u'date': u'2013-01-02T17:22:21Z', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-653: Query.Or should return { } if any subquery is { }.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/220037161e3b2a389d8457f64e694ff95894a1fa

Comment by Robert Stam [ 02/Jan/13 ]

I tracked this down to an issue with Query.Or so I have updated the summary to reflect the underlying root cause.

Generated at Wed Feb 07 21:37:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.