-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: 4.0.14
-
Component/s: Querying
-
Query 2020-03-23
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
We found out that when projection includes "a" and "a.b", that is, parent and child document are both in the projection, the order in BSON Document is prominent. For example:
These two are equivalent:
db.document.find({}, {"a.b":1, "a":1})
db.document.find({}, {"a":1})
and these two:
db.document.find({}, {"a":1, "a.b":1})
db.document.find({}, {"b":1})
I am wondering whether it is undocumented behavior, or it should be able to include the parent document regardless of the order.
- duplicates
-
SERVER-6527 in projection implementation, dotted field inclusion supersedes parent field inclusion
-
- Closed
-