odavid / typeorm-transactional-cls-hooked

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
MIT License
524 stars 86 forks source link

Does it support ActiveRecord mode? #26

Closed zhongyuanjia closed 5 years ago

zhongyuanjia commented 5 years ago

seems the document only say how to use it for DataMapper mode

odavid commented 5 years ago

Hi, Although I have never tested this mode, I believe it will work if you will patch the repository instances. See Patching typeorm repository with base repository

zhongyuanjia commented 5 years ago

👍 it works, thanks a lot.