Node MongoDB Native Driver findAndModify callback signature is wrong

XMLWordPrintableJSON

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

      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
            Reporter:
            Sam Kleinman (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: