Correctly inserting and/or updating many datasets to MongoDB (using mongoose)?
问题 So from time to time I get new exports of a cities database of POIs and info about them and I want to have all that data in my MongoDB with a Loopback-API on it. Therefore I reduce the data to my desired structure and try to import it. For the first time I receive such an export, I can simply insert the data with insertMany(). When I get a new export, it means that it includes updated POIs which I actually want my existing POIs to be replaced with that new data. So I thought I'd use