Strapi doesn't support transactions, so what are my options?

Have a look here:

And I found this code here:
https://www.codegrepper.com/code-examples/javascript/transaction+strapi

Bottom line there is that you have to use underlying knex orm directly which kind of sucks because you essentially jumping down one level of abstraction, bypassing the whole “Strapi” layer but it seems to be the only way.
Sad though, because 1) Strapi does not have a nice and clean support for a fundamental DB mechanism like transaction 2) Can’t really find any documentation on this topic in strapi docs.

@DMehaffy good sir, is there any plan to bring support for transactions to Strapi in v4? Or perhaps a documentation update?

1 Like