-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.8.3
-
Component/s: None
-
None
-
Environment:Windows 7, VS 2012, x64 bit CPU
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When selecting a document using C# drivers v1.8.3.9. If the id is casted as ulong the query does not return document for some ulong values (e.g. 5935691471546811785). But for most ulongs the query does return the documents (e.g. 5935691471546877322). There appears to be no pattern for ulong values for which document will be returned or not. But if the id is casted as long, query always returns the document with the id.
Finds nothing ("Enumeration yielded no results"):
• collection.Find(Query.EQ(Collection.Fields.ID, (ulong) 5935691471546811785))
• {
"_id" : NumberLong("5935691471546811785"),
"test" : ["test_does_not_work"
}
Finds the document:
• collection.Find(Query.EQ(Collection.Fields.ID, (ulong) 5935691471546877322))
• {
"_id" : NumberLong("5935691471546877322"),
"test" : ["test_works"
}
Fix:
Finds the document:
collection.Find(Query.EQ(Collection.Fields.ID, (long) 5935691471546811785))