-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.8.3
-
Component/s: None
-
None
-
Major Change
There is a mistake in the method Not() of MongoDB.Driver.Builders.Query.
Line:
MongoDB.Driver\Builders\QueryBuilder.cs(513): return new QueryDocument(elementName, new BsonDocument("$ne", operatorValue));
Presumably there should be "$not" instead of "$ne".
Now a valid Where query { "$where" :
{ "$code" : "this.Length == null" }} is converted by Not() into invalid { "$where" : { "$ne" :
{ "$code" : "this.Length == null" }} } which fails with an error:
$where expression has an unexpected type (response:
{ "errmsg" : "exception: $where expression has an unexpected type", "code" : 15902, "ok" : 0.0 })
Driver version 1.8.3