I think that findOneAndUpdate
carries out an atomic operation, so I'm assuming that updateOne
does not.
Why would you choose updateOne
over findOneAndUpdate
and avoid an atomic operation and have to spend extra time checking if the updates were atomic?
I would appreciate some insight or a use case.