Add $nop operation to modifier

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Usability, Write Ops
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Although it can be worked around, it can be problematic that when an empty modifier object is used with findAndModify it removes all properties of the document. We suggest adding a no-op modifier operation, $nop, which makes no change to the document. This can therefore be added to all modifier operations and will ensure that previously empty ones will not wipe out the document:

      Usage:
      { $nop: {} }

              Assignee:
              Unassigned
              Reporter:
              Richard Miller-Smith
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: