'Transactions in typeorm with mongodb
I've a nestjs app with mongodb v4.2.2 I'm trying to run a function in a transaction by adding @Transactional() from typeorm-transactional-cls-hooked lib and I'm getting this error
TypeORMError: Transactions aren't supported by MongoDB.
as I know that transactions are supported in mongodb since 4.0. so typeorm is not supporting transactions for mongodb or am I missing something here?
Solution 1:[1]
According to this issue mongodb driver does not support transactions yet. There is a failed PR that has not been updated since 2019.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Soroush Ahrari |
