Details
-
Task
-
Resolution: Won't Do
-
Major - P3
-
None
-
None
Description
Description
Downstream Change Summary
The semantics of $slice is updated to be consistent with other projection operators. Now specifying $slice in projection for a field will trigger an implicit inclusion.
Description of Linked Ticket
https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/
db.inventory.find({"item":"postcard"}, {_id:0, instock:{$slice:1}})
|
returned
{ "item" : "postcard", "status" : "A", "size" : { "h" : 10, "w" : 15.25, "uom" : "cm" }, "instock" : [ { "warehouse" : "B", "qty" : 15 } ] }
|
it was expected to return
{"instock" : [ { "warehouse" : "B", "qty" : 15 } ] }
|
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
Attachments
Issue Links
- documents
-
SERVER-55475 instock:{$slice:1} doesn't trigger the "inclusion"
-
- Closed
-