Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9591

Update: $push + $unique

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • Labels:
    • Query

      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
      

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: