Using the following query:
editFileInformation: function(parentId, file, callback) {
Parent.findOneAndUpdate(
{
'_id': parentId,
'files': {
$elemMatch: {'_id': file._id}
}
},
{$set: {'files.$': file}},
callback
);
},
I get the following error.
It works on models that doesn't have updatedAt
, so it's related to that. But removing updatedAt
from file
doesn't fix it either.