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

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Usability
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Andre' Hazelwood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: