meteor-transactions icon indicating copy to clipboard operation
meteor-transactions copied to clipboard

Support update that replaces the whole document

Open mattmccutchen opened this issue 8 years ago • 0 comments

This package could support update calls that replace the entire document, e.g., collection.update("myId", {a: 1, b: 2}).

The first thing to decide is how such an operation is represented in the transaction history. I have a prototype implementation, based on my prototype of #80, that represents it as a remove followed by an insert. This probably won't work with soft deletes. Alternatively, we could add a new action type, "replace", and try to add support for it in undo and redo without duplicating a ton of code. :/

mattmccutchen avatar Feb 11 '17 21:02 mattmccutchen