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.
I was facing the same problem. I found out that, in my case, all I needed to do was transform the "_id" String representation into a actual ObjectId object.
Try this instead:
//import from native driverconstObjectID=require('mongodb').ObjectID;//will insert or updateletpost={_id: ObjectID("fsdfsdasasd"),changeme: true}newPost(post).save()//... Other stuff happening//will updateletpostAgain={_id: ObjectID("fsdfsdasasd"),changeme: false}newPost(postAgain).save()
By the way... not tested ;)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Where way to make update document without using find?
I try to
let post = {_id: "fsdfsdasasd", changeme: true}
new Post(post).save()
//or
new Post(post).update()
but dont change
The text was updated successfully, but these errors were encountered: