MongoDB findOneAndUpdate returns document that doesn't match the filter
I am trying to setup a findOneAndUpdate operation that will update a document if it matches 2 filters: const existingUser = await this.userModel.findOneAndUpdate({id: id, accountId: acc._id},{$set: {name, properties}}, { new: true}); But Mongo is behaving very weirdly. In the example…