typeorm-typedi-extensions
typeorm-typedi-extensions copied to clipboard
Dependency injection and service container integration with TypeORM using TypeDI library.
### Description Using Typeorm's new way of connecting to a data source with `new Typeorm.DataSource({...})` , we cannot access the global typeorm connection through the typedi container. I'm using Typegraphql...
Fixes scoped containerInstance.get requests for ConnectionManager, which was previously creating a cloned ConnectionManager via new ConnectionManager(), thereby removing all prior connection information.
Trying to follow the below guideline from #39: ```ts import { createConnection, useContainer } from 'typeorm'; import { Container } from 'typedi'; /** Tell TypeORM to use the TypeDI container...
Function `getRepository` from [src/decorators/InjectRepository.ts](https://github.com/typeorm/typeorm-typedi-extensions/blob/master/src/decorators/InjectRepository.ts) seems to be problematic. I dealt with it like this: ```ts // UserRepository.ts import { EntityRepository, Repository } from 'typeorm'; @Service() @EntityRepository(User) export class UserRepository extends...
I'm setting that container set is not exposed - is there a reason ? Or is there a different approach ? I have a few edge case scenarios where I...
While running build file created by Babel. I'm getting this error. I have turned on an "emitDecoratorMetadata": true, option in tsconfig.json and imported "reflect-metadata" on top of the main entry...
order: { createdAt: 'DESC' }, relations: ['r1', 'r2'], skip: 1, take: 25, error ==> duplicated columns
When i start my application in develop mode, all works fine, but when transpile files. I use ts-node-dev to start app. But when i transpile files with babel and start...
Reset container for unit test purposes.
There is a mistake: https://github.com/typeorm/typeorm-typedi-extensions/blob/b6d540e2084c832a66573b23374384d367f725f5/src/errors/entity-type-missing.error.ts#L6 The addition operation will be executed first and the result will never be undefined. For the same reason `Missing "entityType" parameter of "@InjectRepository" decorator` will...