Skip to content

Commit

Permalink
docs: update select-query-builder RelationQueryBuilder with a example (
Browse files Browse the repository at this point in the history
  • Loading branch information
laurix-dev committed Feb 17, 2022
1 parent a24d48a commit 60a5b84
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/select-query-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,17 @@ There are 5 different `QueryBuilder` types available:
```

* `RelationQueryBuilder` - used to build and execute relation-specific operations [TBD].
Example:

```typescript
import {getConnection} from "typeorm";

await getConnection()
.createQueryBuilder()
.relation(User,"photos")
.of(id)
.loadMany();
```

You can switch between different types of query builder within any of them,
once you do, you will get a new instance of query builder (unlike all other methods).
Expand Down

0 comments on commit 60a5b84

Please sign in to comment.