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

Not working with Nestjs 6 #23

Closed ondrakub closed 5 years ago

ondrakub commented 5 years ago

With Nestjs version 6 it is not working.

When I can use repository in service:

constructor(
    private readonly userRepository: UserRepository
  ) {}

I got error that It cannot resolve dependencies...

odavid commented 5 years ago

@ondrakub - Not sure I understand. Can you please give more details such as:

Did it work for you before on this project? I am not sure where did you use the @Transactional and how. Can you elaborate?

ondrakub commented 5 years ago

yes, with nest js 5 ("@nestjs/common": "5.7.4" etc..) it works.

I can prepare small repository with example or if I just describe it here?

odavid commented 5 years ago

Small repository will be super great!

ondrakub commented 5 years ago

I'm so sorry. We did not have the latest minor version of nestjs 6. It works now. Thank you for your time. I'm closing the issue.