Database Transactions
complete
Daniel Susanu
Hi Guys, I could not find a way of doing a database transaction by reading the documentation. Is this not implemented yet? If not how is such a fundamental functionality of an api not implemented or in the road map?
This should be the highest priority since many people will need this.
Could you please let me know what is the plan for this and how soon is going to be implemented?
Regards,
Niklas Winkels
complete
Database Transactions Are Here! 🎉
Strapi 5 now provides an API to ensure data integrity by wrapping multiple operations in a transaction. If all operations succeed, the data is permanently saved to the database. If any operation fails, the entire transaction is rolled back, and data is returned to its previous state.
- Nested Transactions for better control.
- onCommit/onRollback Hooks to trigger actions.
- Works with Knex Queries.
Check out the documentation:https://docs.strapi.io/dev-docs/database-transactions
Thanks for your feedback and support! 🙌
V
Víctor Martínez Calvo
Is this coming as part of Strapi v5 ?
Marc Roig Campos
While this is still experimental and is subject to changes in the future versions, there is the possibility to use transactions.
We had been using this internally for the past months but I can not give an exact date of when this will released as stable :)
P
Pablo Criado-Perez
Hi, checking in to see if there any updates on the release of transactions?
Harjas Sodhi
Hi! I am looking to implement transactions in my app and found that they are not currently supported, seeing as this thread is old, any updates or any alternative to transactions with strapi v4?
Thanks
Derrick Mehaffy
Merged in a post:
Support Database Transactions with Knex
w
willnode
Please support database transactions in v4. v3 actually supports database transactions since it is used with Bookshelf.js. v4 uses a custom database engine and I can't see how I can insert knex.js transactions in custom code.
Please read my draft article on how to use database transactions in v3, it also tells the real reason why database transactions is a must:
manuelf.
Any news on this ? Would be a blast to have it implemented!
jejom43
Is there any news on this feature?
Derrick Mehaffy
in progress
Daniel Susanu
Hi Guys, what is the status of this?
Load More
→