Skip to content

Commit

Permalink
docs: fix function name (typeorm#8840)
Browse files Browse the repository at this point in the history
The name of the function declared in the repository does not match with the function name used in the examples.
  • Loading branch information
rafaumlemos authored Apr 2, 2022
1 parent 5176a0a commit d18e0ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/custom-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit d18e0ee

Please sign in to comment.