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

Deep nested document not updated

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      db.coll.update({}, {$set: {"a.$[i].c.$[j].d": 2}}, {arrayFilters: [{"i.b": 0}, {"j.d": 0}]})
      

      Input:

      {a : [ { b : 0, c : [ { d : 0 }, { d : 1 } ] }, { b : 1, c : [ { d : 0 }, { d : 1 } ] } ] }
      

      Output:

      {a : [ { b : 0, c : [ { d : 2 }, { d : 1 } ] }, { b : 1, c : [ { d : 0 }, { d : 1 } ] } ] }
      

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            samba samba
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: