-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.5
-
Component/s: Querying
-
None
The $ operator cannot be used in projections if there is more than one array field in the corresponding query. (http://docs.mongodb.org/manual/reference/operator/projection/positional/#array-field-limitations)
This seems counter-intuitive since in the projection, the $ operator occurs in an array field name and so it should be unambiguous to which array it refers.
I'd suggest therefore to remove this limitation and allow the $ operator even if there is more than one array field in the corresponding query.
- duplicates
-
SERVER-18500 Resolve ambiguity of positional projections with multiple implicit array traversal predicates in certain cases
- Backlog