Hello : )
Update is atomic in the document, so we are safe that while we were updating no one can change the document.
How i can do the same with merge?
I just want to update 1 document, but i want to use stages like lookup and group, that doesn’t
work in update pipeline.
coll1.aggregate([..change_doc1...merge(write_doc1_tocoll1)])
I want to read doc1 for example from coll1, do the pipeline , merge doc1 back , and i dont want while i do this anyone to have change the doc1. (else possible data loss)
I need a transaction?How to do this safely?
Thank you