Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3744

Comment on: "manual/reference/operator/update/pull.txt"

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • v1.3.9
    • manual
    • 4
    • true

    Description

      Please add a section describing how to $pull subdocuments from an array, since $elemMatch doesn't work and instead, we need to use (what I think is) a non-standard query operation.

      For example, if you have this document:

      {x: 0, y: [ {a:1} , {a:2} ]}

      this works:

      {$pull: {y: {a: 2}}}

      but this does not:

      {$pull: {y: {$elemMatch: {a: 2}}}}

      see https://jira.mongodb.org/browse/SERVER-2016

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            xgen-internal-docs Docs Collector User
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 2 weeks ago