Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-6267

Comment on: "manual/tutorial/create-an-auto-incrementing-field.txt"

    XMLWordPrintableJSON

Details

    Description

      Hi,

      This example never works directly in Node.js unless you specify sort field details and that too using 1 or 0.

      counters.findAndModify({ _id:

      { $eq: "virtualcurrency" }

      },

      { '_id': 1 }

      , { $inc:

      { seq: 1 }

      },

      { new: true }

      , function (err, result) {

      Regards

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 14 weeks, 1 day ago