Yield generated for aa6058f5-7828-4635-a4a4-e80f94c8df66
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

12 lines
457 B

import { EntityRepository, Repository } from 'typeorm';
import { {{ properCase name }} } from './{{ kebabCase name }}.entity';
import Optional from 'typescript-optional';
@EntityRepository({{ properCase name }})
export class {{ properCase name }}Repository extends Repository<{{ properCase name }}> {
async findOneById(id: number): Promise<Optional<{{ properCase name }}>> {
return Optional.ofNullable(
await this.findOne(id, {}),
);
}
}