[CSHARP-156] Unexpected result when querying Created: 25/Jan/11  Updated: 19/Oct/16  Resolved: 25/Jan/11

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

Type: Bug Priority: Blocker - P1
Reporter: Guirec Assignee: Robert Stam
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP 32 bits



 Description   

Look at the 3 following queries:

var items1 = db.GetCollection<EmailMessage2>().Linq().Where(x => x.Attribs.Count == 2).ToList();
var items2 = db.GetCollection<EmailMessage2>().Find("{ _t: \"EmailMessage2\", Attribs: { $size:

{ $gt: 0 }

} }").Documents.ToList();
var items3 = db.GetCollection<EmailMessage2>().Linq().Where(x => x.Attribs.Count > 0).ToList();

1 and 2 work fine but 3 brings no result back. I would expect that 3rd query return the same as 2nd (which indeed are the same query).



 Comments   
Comment by Robert Stam [ 25/Jan/11 ]

The samus driver is a different driver than this one. I believe the current versions of that driver are now hosted at:

https://github.com/mongodb-csharp/mongodb-csharp

and they use this page for reporting issues:

https://github.com/mongodb-csharp/mongodb-csharp/issues

Comment by Guirec [ 25/Jan/11 ]

Thanks Robert for quick reply.

I can't tell if it is a bug driver... I got the binaries from here : https://github.com/samus/mongodb-csharp/
and it is mentioned on that page that : "The bug tracker is the same as the Mongodb bug tracker located at http://jira.mongodb.org"

Sorry if I did not post in the correct place. Any idea where I should go ?

Guirec.

Comment by Robert Stam [ 25/Jan/11 ]

The Linq() method in your 3rd query is not part of the official driver.

Are you sure this is a driver bug?

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