docs: fix function name (#8840)

The name of the function declared in the repository does not match with the function name used in the examples.
This commit is contained in:
Rafael Lemos 2022-04-02 12:28:37 -03:00 committed by GitHub
parent 5176a0aff7
commit d18e0eefd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ In order to extend `UserRepository` functionality you can use `.extend` method o
```typescript
// user.repository.ts
export const UserRepository = dataSource.getRepository(User).extend({
findOneByName(firstName: string, lastName: string) {
findByName(firstName: string, lastName: string) {
return this.createQueryBuilder("user")
.where("user.firstName = :firstName", { firstName })
.andWhere("user.lastName = :lastName", { lastName })