Open xarielah opened 1 year ago
create a custom repository like below and use it as the entity repository, passing the entity as an argument
export function CustomRepository(entity: Function): ClassDecorator { return SetMetadata(TYPEORM_EX_CUSTOM_REPOSITORY, entity); }
@CustomRepository(Task)
export class TaskRepository extends Repository
I tried the solution on the Stackoverflow. It works but it doesn't use EntityRepository or CustomRepositoy decorators.
This decorator of which using to create custom repositories is deprecated. Please be aware Ariel :)