System Information
- Strapi Version: 4.1.10
- Operating System: Linux
- Database: SQLite
- Node Version: 14.16.0
- NPM Version: 6.14.11
- Yarn Version: 1.22.5
On strapi v3.6 query builder could be used to make such operations. In strapi v4 bulk operations are supported but as it is on documentation: To avoid performance issues, bulk operations are not allowed on relations.
How to make a bulk operation on strapi v4 supporting relations?
As an example (this does’nt work):
await strapi.db.query("api::account.account").createMany({
data: [{ ...account, foreignKey }, ...manyOthers],
});