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

returnOriginal option in findOneAndUpdate unnecessarily differs from returnNewDocument option in shell

      It is very easy as a developer to make the mistake of thinking documentation for the MongoDB shell applies to the node driver because many methods are so similar between the two.

      Imagine my surprise and confusion on finding that returnNewDocument doesn't work in the node driver, and I have to use returnOriginal instead, which takes the opposite value.

      I think most developers would try to minimize mismatch between the node API/shell if they could start from scratch. Consistency in naming helps everyone.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            jedwards1211 James Edwards
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: