Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2106

findAndModify a batch WAS: It would be nice to return Documents that were updated as part of a Update or Upsert query.

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Usability
    • None

      In order to easily represent a queue, it would be nice to be able to do the following:

      Update the top 10 records with some value and then return those records as part of the same query.

      Currently, we can utilize FindAndModify to return a single record, but it would be nice to be able to do this in batches:

      jobs = db.jobs.findAndModify( {sort:

      {priority:-1}

      ,

      {locked: 1}

      , count: 10} );

            Assignee:
            Unassigned Unassigned
            Reporter:
            ahazelwood@ciradar.com Andre' Hazelwood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: