db.collection.findAndModify()
complete
A
AJAY SAHANI
Add findAndModify() function to the SDK. This will provide atomic find+update and also return the updated document. The existing updateOne() does not return the updated document. You may do findOne() after the update that may cause data integrity problems in a multithreaded system where the same document is being updated by separate threads/sessions.
Drew DiPalma
complete
Hi All –
With the latest release we now support findOne, findOneAndUpdate, findOneAndReplace, and findOneAndDelete within Stitch Functions and the JS SDK. Subsequent releases will cover this work in Android and iOS. I believe this addresses the nature of this item, but feel free to create a new Canny if you are looking for additional functionality.
Thanks,
Drew
Drew DiPalma
in progress
We've started this work.
Drew DiPalma
Hi Ajay – Thanks for the feedback, we are investigating this now and I will update the thread when the work is scheduled.