Is it possible to create a bulk create that will not fail if any of the rows fail and returns all the rows which failed to insert into the database. ex: I am inserting 1000 users into database, 10 of them fail, can I get details of those 10 failed ones along with the reason for failure I am using mariadb.
Asked
Active
Viewed 781 times
0
-
check [this](https://github.com/sequelize/sequelize/issues/5794) i think you need to have a .catch block taht handles errors. it's different than an .error block. There's an example of that at the bottom of [this](https://medium.com/@hz.bird55/using-sequelize-bulkcreate-method-with-mysql-database-1ebd1bae2109) page – John Mar 13 '20 at 08:23
-
What do you mean failed to insert? sequelize model validation didn't pass or violate constraints? – Lin Du Mar 17 '20 at 10:17
-
@slideshowp2 if the model validation fails – sharad shetty Mar 18 '20 at 07:52