-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.1, 2.5.3
-
Component/s: Querying
-
Query Execution
It will be nice to have support $elemMatch projection on nested documents.
For example when schama look like this to support multilingual:
{ "name": [ { "locale": "en", "value": "milk" }, { "locale": "de", "value": "milch" } ], "brand": { "attribute": "value1", "name": [ { "locale": "en", "value": "MilkBrand" }, { "locale": "de", "value": "MilchMarke" } ] } }
this query is unsupported
db.test.find({},{name:{$elemMatch:{locale:"en"}},"brand.name":{$elemMatch:{locale:"en"}}})