typeorm-transactional-cls-hooked icon indicating copy to clipboard operation
typeorm-transactional-cls-hooked copied to clipboard

The RelationLoader ignore the CLS transaction

Open fstn opened this issue 5 years ago • 1 comments

Hey,

how do you manage to use the transactional entity manager for the relation loader?

When I take a look at the code, I can see that it's use

     this.connection.createQueryBuilder(queryRunner)

I try to do :

             await candidateFilesService.getRepo().
             createQueryBuilder()
            .useTransaction(true)
            .relation(CandidateEntity, 'candidateFile')
            .of(c1).loadOne()

fstn avatar Jul 09 '20 19:07 fstn

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

cassinaooo avatar Jan 22 '21 21:01 cassinaooo