You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using Mongorito for some time now, and I really like it over some of the alternative node.js driver options out there. Mongorito uses mquery underneath the surface, which is great, since all of the mquery functionality is exposed.
I have on a growing number of occasions now run into a need for findOneAndReplace. This was added in MongoDB 3.2, and is one of the most useful update methods for me these days. I am not sure if there is a reason this operator has not been added, however i would love to see it added. I have multiple uses for it at the current time.
The text was updated successfully, but these errors were encountered:
You can use findOneAndUpdate with .setOptions({replace: true}) to achieve your goal. The replace option is only valid in mquery and support old MongoDB. It works as polyfill and maybe need to be updated to use latest driver version to enhance performance.
I have been using Mongorito for some time now, and I really like it over some of the alternative node.js driver options out there. Mongorito uses mquery underneath the surface, which is great, since all of the mquery functionality is exposed.
I have on a growing number of occasions now run into a need for
findOneAndReplace
. This was added in MongoDB 3.2, and is one of the most useful update methods for me these days. I am not sure if there is a reason this operator has not been added, however i would love to see it added. I have multiple uses for it at the current time.The text was updated successfully, but these errors were encountered: