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

Multi $(update) use or update in aggregation pipeline

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: