Allow new $unique option for $push to allow better control over array/set semantics.
db.c.save({_id:1, a: [{name:"scott"}, {name:"john"}]}); db.c.update({_id:1}, {$push: {a : {$each:[{name:"scott"}], $unique:"name"}}}) // no-op
- is related to
-
SERVER-2362 Add new Deque/Set operation modifiers
- Closed
-
SERVER-11210 $addToSet missing $position and $slice/sort improvements that $push has
- Closed