Does MongoDB still update or overwrite a document if the values will be unchanged?

Yes @scott_molinari, this is same as we discuss earlier. if we update the document and new document is same as previous then the modification flag will be 0. But if we use some timestamp field in it then only that field will be updated, rest will be same.
This doesn’t mean that we have incorrect data as the new record was same as previous so it doesn’t matter, basically new record is same as previous. So saying that the data is not in updated version it is wrong, it’s the updated document.
@Nabeel_Raza

1 Like