docs: update select-query-builder RelationQueryBuilder with a example (#8658)

This commit is contained in:
Leandro 2022-02-17 12:49:22 -03:00 committed by GitHub
parent a24d48a623
commit 60a5b84826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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).