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

Deep nested document not updated

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      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 } ] } ] }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: