Multi $(update) use or update in aggregation pipeline

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Why the positional $ operator cannot be used for queries which traverse more than one array?

      A possible solution is to pass to the update method an array of quey to solve $ operator.

      db.collection.update(

      { <array>: value ... }

      , { <update operator>:

      { "<array>.$....$" : value }

      },{ query_array:

      { query1,query2,...}

      } )
      Each item in array query solve in order the $ operator

              Assignee:
              Unassigned
              Reporter:
              Paolo Pino
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: