mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
docs: update select-query-builder RelationQueryBuilder with a example (#8658)
This commit is contained in:
parent
a24d48a623
commit
60a5b84826
@ -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).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user