Basic Update Fails

I have a collection called “Corpus”.

In that collection, I have three records. The “field” for the data is called, “data”.

The _id for the field I want to update is: “62c84c6cecede206139d725e”.

This update statement fails and just prints “WriteResult({”

** “data”: “who are you???”}});**

I’ve tried switching to single quotes, unquoting the ID, but I can’t get it to update this “field”.

What am I doing wrong?


You cannot update _id field directly with update
It is a primary key in mongodb
Check dba stackexchange forum where they discuss adding new row with your required set value and deleting old row