Details
-
Improvement
-
Status: Closed
-
Minor - P4
-
Resolution: Duplicate
-
2.4.10, 2.6.1
-
None
-
None
-
Query
Description
if _id is an object you cannot project out on of it's members in a normal projection, you can using $project in aggregation
> db.foo.insert({_id:{a:1,b:1}})
|
WriteResult({ "nInserted" : 1 }) |
> db.foo.find({},{_id:0,"_id.a":1}) |
{ }
|
Attachments
Issue Links
- duplicates
-
SERVER-7502 Query's projection does not obey partial inclusion or exclusion of _id
-
- Closed
-