I’ve been battling this for a few days so figured I’d just ask! I’m new to Realms/Mongo so it’s probably something simple. I had a quick search and I couldn’t find something similar.
I’m following the guide here:
On how to update a document in a linked atlas collection using a realm connection. The docs seem to say create a Document(…) for the query and a Document(…) specifying the values you wish to update.
The behaviour I seem to be seeing is that the new Document replaces the matching document rather than updating matching fields. Just wondering what I could be doing wrong?
The screenshots attached are from Atlas/Realm website with me trying to query for Document(“name”, “russian”) and updating with Document(“difficulty”, 99). The query in the realm log looks like I would expect and indeed this works if I perform a similar update on the console.
I can only upload one photo apparently, so sorry for the bodged paint job
Is there something I am missing? The only way I can seem to get this to work is to populate all the original fields in the update query which is tedious. This is all on Android but I think it’s something more fundamental that I am missing… Maybe some setting or something silly?