Skip to content

Commit

Permalink
docs: update entity-manager-api.md (typeorm#9956)
Browse files Browse the repository at this point in the history
typo:
const timber = await manager.findOne(User, { firstName: "Timber" })   →   const timber = await manager.findOneBy(User, { firstName: "Timber" })

Co-authored-by: Jo YoHan <37216082+oxyrinchus@users.noreply.github.com>
  • Loading branch information
slowhigh and slowhigh authored Apr 18, 2023
1 parent e0165e7 commit b064049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/entity-manager-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const timber = await manager.findOne(User, {
- `findOneBy` - Finds the first entity that matches given `FindOptionsWhere`.

```typescript
const timber = await manager.findOne(User, { firstName: "Timber" })
const timber = await manager.findOneBy(User, { firstName: "Timber" })
```

- `findOneOrFail` - Finds the first entity that matches some id or find options.
Expand Down

0 comments on commit b064049

Please sign in to comment.