A Transactional Method Decorator for typeorm that uses cls-hooked to handle and propagate transactions between different repositories and service methods. Inpired by Spring Trasnactional Annotation and Sequelize CLS
I'd like to know whether some code is running as a result of a call to a method that was decorated with @Transactional or not, to make sure all DB updates are done only inside transactions. Now to get context I have to hard-code value of NAMESPACE_NAME (from src/common.ts) in my code, being able to import it would be helpful.
I'd like to know whether some code is running as a result of a call to a method that was decorated with
@Transactional
or not, to make sure all DB updates are done only inside transactions. Now to get context I have to hard-code value of NAMESPACE_NAME (fromsrc/common.ts
) in my code, being able to import it would be helpful.