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

Allow ability to update N items instead of all or first one found.

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Write Ops
    • None

    Description

      In some cases, it would be nice to update the top N items as part of a update query rather than having to retrieve all items and loop through the top N items to update them. For example, if I have 1000 customers, but I want to only apply a discount to those top 10 customers having sales over x amount, I would currently have to do a Find to retrieve all customers matching my criteria and then loop through and update the top 10. A cursor gets me part of the way, but still seems like a lot of overhead when I want to do just an atomic update.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: