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

Node MongoDB Native Driver findAndModify callback signature is wrong

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Node.js driver ("mongodb", not "mongoose")

      http://mongodb.github.io/node-mongodb-native/markdown-docs/insert.html

      ...under "Find and Modify" states:

      "callback is the function to run after the update is done. Has two parameters - error object (if error occured) and the record that was updated"

      There is also a third parameter passed to the callback. I assume it's getLastError, but it looks like this:

      {"value": null, "ok": 1}

      .

      This makes a difference if you're using an asynchronous library like "async".

            Assignee:
            Unassigned Unassigned
            Reporter:
            sam.kleinman Sam Kleinman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: