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
{{ message }}
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.
So I want to save document with insert or update if exist, and figured out that findOneAndUpdate with opt {upsert:true} maybe could, but it encounter error when save(). How is proper use of this method? here is my code :
(node:21468) UnhandledPromiseRejectionWarning: TypeError: existdt.save is not a function
warning.js:18
at Function.Mdel.upsert (D:\app\botkorter\src\dbase.js:46:17)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So I want to save document with insert or update if exist, and figured out that
findOneAndUpdate
with opt{upsert:true}
maybe could, but it encounter error whensave()
. How is proper use of this method? here is my code :and this is the error msg:
The text was updated successfully, but these errors were encountered: