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

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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • v1.3.9
    • Affects Version/s: None
    • Component/s: manual
    • Environment:

      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

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

              Created:
              Updated:
              Resolved:
              10 years, 2 days ago