mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
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:
parent
5176a0aff7
commit
d18e0eefd5
@ -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 })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user