0

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.

kopa
  • 341
  • 2
  • 13

0 Answers0