Willians Cassiano

Results 9 comments of Willians Cassiano

hey @fstn, can you provide a minimal reproduction repo?

Hi @alsonkemp! If I understand you correctly, you will need to follow the steps in the README to set up a custom repository, and then use `@Transactional()` in all methods...

@alsonkemp, I'm checking with @odavid if a class decorator makes sense in this lib. However, https://github.com/odavid/typeorm-transactional-cls-hooked/issues/41 contains a custom class decorator implementation that would work.

> Can I do getManager().createQueryBuilder(MyEntity) and expect the @Transactional to cover it? Managers / QueryBuilders obtained using the patched repository run inside the transaction in my experience. I usually do...

I extended the `Transactional` decorator for entire classes using this custom decorator: ```typescript export interface TransactionalOptions { propagation: Propagation isolationLevel: IsolationLevel } const TransactionalService = (options: TransactionalOptions): ClassDecorator => {...

@odavid Is there a way for the `@Transactional` decorator to be aware of this new class decorator, or vice-versa? I'm not familiar with meta programming on typescript, maybe Reflect Metadata?...

@odavid I see and agree with your point. What should be expected of `@Transactional` when we have `@TransactionalService` active, specially in nested calls? This will eventually happen in large enough...

I'll try and submit a PR in the next few days. Thanks for your inputs @mscottnelson! I'll will follow your suggestion of `@Transactional` always overriding the class decorator. We can...

Hi @ekifox, can you provide a minimal sample repo?