Details
-
Task
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
Description
From http://codereview.10gen.com/8998011/
{ $push: { a:
{ $each: [ 1 2 3] } } }
is the new $pushAll. The latter will be deprecated in favor of this
Syntax for creating a fixed sized array is:
{ $push: { a:
{ $each: [1], $trimTo: 5 }} }
I.e after appending the elements in $each, we'd trim the resulting array to 5 elements.
Attachments
Issue Links
- depends on
-
SERVER-991 $push with $slice + $sort
-
- Closed
-
- duplicates
-
DOCS-874 Add New $push operator syntax
-
- Closed
-