SaveOne and SaveMany added to CRUD Spec

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Component/s: None
    • None

      The CRUD specification has added saveOne and saveMany to aid users in performing idempotent saves. Previously, users were required to do a replaceOne with an upsert. While this was doable, it was annoying to specify when this is such a common scenario.

      There is a difference in implementation for drivers that mutate documents vs. those that do not. In the former case, if a document is "saved" without an identifer, the driver will generate one just like it does for insert. However, drivers that do not mutate will reject the save with an error or exception. This is due to the requirement for this operation to be idempotent. The details are spelled out in the spec.

      Yaml/JSON tests have been added.

              Assignee:
              Craig Wilson
              Reporter:
              Craig Wilson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: