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

[Manual] Wrong position of comment field for delete command

      Reference manual page for delete command - https://docs.mongodb.com/manual/reference/command/delete/ - says that comment field should be inside of deletes array. However, comment has to be a top level field.

      test> db.runCommand({"delete": "collection0", "deletes": [{"q": {}, "limit": 1, "comment": "test"}]})
      MongoServerError: BSON field 'delete.deletes.comment' is an unknown field.
      
      test> db.runCommand({"delete": "collection0", "deletes": [{"q": {}, "limit": 1}], "comment": "test"})
      {
        n: 0,
        electionId: ObjectId("7fffffff0000000000000004"),
        opTime: { ts: Timestamp({ t: 1641910276, i: 1 }), t: Long("4") },
        ok: 1,
        '$clusterTime': {
          clusterTime: Timestamp({ t: 1641910276, i: 1 }),
          signature: {
            hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
            keyId: Long("0")
          }
        },
        operationTime: Timestamp({ t: 1641910276, i: 1 })
      }
      

            Assignee:
            sarah.olson@mongodb.com Sarah Olson
            Reporter:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 24 weeks, 3 days ago