You need to provide some classes and decorators yourself to maintain the same style as typeorm@2.x
.
@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}
↓
@CustomRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}
@Module({
exports: [UserService],
imports: [TypeOrmModule.forFeature([UserRepository])],
providers: [UserService],
})
export class UserModule {}
↓
@Module({
exports: [UserService],
imports: [TypeOrmExModule.forCustomRepository([UserRepository])],
providers: [UserService],
})
export class UserModule {}
Hey everyone. Any idea how to use method from CustomRepository1 in CustomRepository2 ? I tried to inject CustomRepository1 in constructor, but then I should call super() and pass the params which I don't know :(