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

Comment on: "manual/reference/method/db.collection.deleteOne.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None

    Description

      I believe that there is a mistake in one of the examples of the function deleteOne

      The following operation deletes the order with _id: ObjectId("563237a41a4d68582c2509da") :

      try {
      db.employees.deleteOne(

      { "_id" : ObjectId("563237a41a4d68582c2509da") }

      );
      }
      catch (e)

      { print(e); }

      inside the try block, when the deleteOne function is called , the collection should be order.
      I also attach an screenshot (hosted in dropbox) of the example.
      https://db.tt/VlMPRojw

      Hope that i can help.

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 9 weeks, 1 day ago