Support database transactions #1487
Replies: 5 comments 5 replies
-
Hey @jakubjanis! To make this possible very quickly, our next step is going to be to expose the mongoose connection on the After that we can assess how it fits into the existing API to be more friendly than handling it on your own. How does this sound? |
Beta Was this translation helpful? Give feedback.
-
I ran into a couple issues.
Before I finish the work I want to be sure the Let me know your thoughts. |
Beta Was this translation helpful? Give feedback.
-
Really waiting for that feature to go live. It's crucial for apps to have the option to rollback if something goes wrong across one transaction. |
Beta Was this translation helpful? Give feedback.
-
Any further updates on this feature? It would be great if we could have a ball park estimation of when this feature is going live. |
Beta Was this translation helpful? Give feedback.
-
Transactions were released in v2 of Payload and improved further in 3.0 beta. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Based on the Discord chat I would like to propose an improvement of Payload to allow use of DB transactions.
I think there are many cases when there is a need to execute multiple DB operations as whole (committing a transaction) or not at all (transaction rollback - in case any of the operations fails).
For illustration, please see how transactions can be executed for example in Strapi (another headless CMS).
Source:
https://strapi.io/blog/using-database-transactions-to-write-queries-in-strapi
Beta Was this translation helpful? Give feedback.
All reactions