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

Clarify remove() method Behavior

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.0
    • None
    • manual

    Description

      why does "remove" delete all matching records by default? dont you think the default option should be to delete only first matching record and if required user will pass "false" for second parameter to remove all records.

      im new to mongo and i made a mistake of passing bad query to "remove" and it resulted in deletion of > 10 millions documents

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 3 weeks, 1 day ago