Answer the question
In order to leave comments, you need to log in
How to update the entire database using updateMany?
I need all incoming data for all fields, update in the mongo database, that's what I found but it doesn't work, tell me how to use it correctly
async filterDatabase(filterClient){
const data = await this.productModel.updateMany(
{},
{filterClient},
{ multi: true}
);
return data
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question