Description
Summary
Behaviour changed on how the following linq query is parsed:
collection
|
.AsQueryable()
|
.Where(x => !x.List.Any(xx => xx.ToLower().Contains(input.ToLower())))
|
.ToString();
|
Wrong query MongoDB.Driver (2.19.0):
{ "$match" : { "List" : { "$not" : { "$elemMatch" : /string/is } } } } |
Expected and worked in MongoDB.Driver (2.18.0)
{ "$match" : { "List" : { "$not" : /string/is } } } |
This is only broken for a $not query. The folowing snippet works fine:
collection
|
.AsQueryable()
|
.Where(x => x.List.Any(xx => xx.ToLower().Contains(input.ToLower())))
|
.ToString()
|
{ "$match" : { "List" : /string/is } } |