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 Jan 26, 2022. It is now read-only.
I managed to get Mongomantic working and I can get objects from the database and also save new objects to the database. But how does updating and deleting work?
if i do this:
Hey @janolehuebner! The way things work now is if the document already has a _id field, then the document in the DB will be overwritten by whatever you're saving. I want to change things to check if the document already exists however, and in that case only update the fields that have changed.
At that point, you'll be able to use doc.save(), and it would check if the document already exists, and if it does, would only update the existing fields.
That would cover your usecase right?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Checklist
issues
.β Question
How does updating an object work?
π Additional context
I managed to get Mongomantic working and I can get objects from the database and also save new objects to the database. But how does updating and deleting work?
if i do this:
I'd expect it to update the existing user in the database, but this generates a new document with the new values.
As there doesn't seem to be any documentation on updating and deleting for now: What am I doing wrong here? How does updating and deleting work?
The text was updated successfully, but these errors were encountered: