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

Node MongoDB Native Driver findAndModify callback signature is wrong

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Trivial - P5 Trivial - P5
    • None
    • None
    • None
    • None
    • Node.js driver ("mongodb", not "mongoose")

    Description

      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".

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: