Skip to content

Commit

Permalink
docs: adding undocumented behavior to findOptions doc (typeorm#8499)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianadams731 authored Jan 15, 2022
1 parent ef209e7 commit ce69228
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/find-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@ userRepository.find({
});
```

If `undefined` is passed as an argument, find will return all items in the table, and findOne will return the first item in the table.
```ts
userRepository.find(undefined);

```

will execute following query:

```sql
SELECT * FROM "user"
```

## Advanced options

TypeORM provides a lot of built-in operators that can be used to create more complex comparisons:
Expand Down

0 comments on commit ce69228

Please sign in to comment.