Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1807

Why 'returnOriginal' option for the .findOneAndUpdate instead of 'returnNewDocument'

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • next
    • Affects Version/s: 3.1.4
    • Component/s: None
    • Environment:
      x86_64 Linux 4.19.8-arch1-1-ARCH
      Node v11.5.0
      mongodb node module 3.1.4
      mongodb version v4.0.4

      I wonder why the MongoDB Node.JS driver doesn't use the same option names as the ones on the official MongoDB documentation.

      http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndUpdate

      https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndUpdate/

      Here for example, is there any reason why does the driver use the option 'returnOriginal' instead of 'returnNewDocument'?

      Thanks.

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            taigah.dev Taigah Dev
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: