Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
Translate a.Any() with no predicate in filters.
For example:
collection.Where(x => x.A.Any())
|
translates to:
{ $match : {
|
$and : [
|
{ A : { $ne : null } }, |
{ $nor : [ { A : { $size : 0 } } ] } |
]
|
} }
|
The check for A not null is because we deem the null value to not match the Any condition.
The use of $nor with one argument is to simulate logical negation. We can't use $not because that has different semantics (and limitations) in the filter language.
Attachments
Issue Links
- is depended on by
-
CSHARP-3404 LINQ3: Get LegacyPredicateTranslatorTests to pass
-
- Closed
-