-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:None
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.
- depends on
-
SERVER-991 $push with $slice + $sort
- Closed
- duplicates
-
DOCS-874 Add New $push operator syntax
- Closed