-
-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mikro-orm): provide the ability to avoid an explicit transaction #1997
Conversation
09ccce0
to
b435bb4
Compare
Perfect :) @derevnjuk You can click on merge button when you are ready ;) See you :D |
Pull Request Test Coverage Report for Build 2714197662
💛 - Coveralls |
🎉 This PR is included in version 6.118.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 7.0.0-beta.13 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Pull Request Test Coverage Report for Build 2713456200Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Information
In some cases, you might need to avoid an explicit transaction, but preserve an async context to prevent the usage of the global identity map. For example, starting with v3.4, the MongoDB driver supports transactions. Yet, you have to use a replica set, otherwise, the driver will raise an exception.
Usage example
To prevent
@Transactional()
use of an explicit transaction, you just need to set thedisabled
field totrue
:You can also set the flushing strategy for the transaction by setting the
flushMode
:Todos
closes #1996