I am trying following query in MongoDB v5.0 db.test.insertOne({"test":"value"}) db.test.update({"test":"value"},{}) ... this throws an error saying "Uncaught MongoDriverError: Update document requires atomic operators" but earlier(MongoDB 4.4.2) this used to pass and update the document to empty. why this is no longer allowed ?
I have checked this below question, but this talks about $set,$unset operators and above query seemed to be working fine. Why does MongoDB no longer allow using $set and $unset with an empty document? . PSI the image stating the above issue :- Problem