Aliheym / typeorm-transactional

A Transactional Method Decorator for TypeORM that uses Async Local Storage or cls-hooked to handle and propagate transactions between different repositories and service methods.
MIT License
213 stars 28 forks source link

refactor: remove unnecessary patch #29

Closed tsugitta closed 1 year ago

tsugitta commented 1 year ago

as patchManager is called for Repository.prototype, there seems no need to call patchManager for the specific repository instance.

BTW, it'd be nice to publish new version to include #23 and this (if merged).

tsugitta commented 1 year ago

@Aliheym Do you have any thoughts on this?

Aliheym commented 1 year ago

@tsugitta thank you for PR. You are absolutely right.

I also believe that we can remove the following line for the same reason:

Repository.prototype.extend = getRepository(originalExtend);