Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
Query
-
ALL
Description
I don't know which is correct, but they should do the same thing (possibly both erroring out).
> db.foo.find()
|
{ "_id" : ObjectId("4fff661614a4344a2507267c"), "a" : { "b" : { "c" : 1 } } }
|
{ "_id" : ObjectId("4fff73ad14a4344a2507267d"), "a" : [ { "b" : [ { "c" : 1 } ] } ] }
|
> db.foo.find({}, {'a':1, 'a.c':1})
|
{ "_id" : ObjectId("4fff661614a4344a2507267c"), "a" : { } }
|
{ "_id" : ObjectId("4fff73ad14a4344a2507267d"), "a" : [ { } ] }
|
> db.foo.find({}, {'a.c':1, a:1})
|
{ "_id" : ObjectId("4fff661614a4344a2507267c"), "a" : { "b" : { "c" : 1 } } }
|
{ "_id" : ObjectId("4fff73ad14a4344a2507267d"), "a" : [ { "b" : [ { "c" : 1 } ] } ] }
|
Attachments
Issue Links
- duplicates
-
SERVER-6527 in projection implementation, dotted field inclusion supersedes parent field inclusion
-
- Closed
-