Skip to content

fetchPartial documentation #946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions core/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@ api_platform:
Be careful when you exceed this limit, it's often caused by the result of a circular reference. [Serializer groups](serialization.md)
can be a good solution to fix this issue.

#### Fetch Partial

If you want to fetch only partial data according to serialization groups, you can enable `fetch_partial` parameter:

```yaml
# api/config/packages/api_platform.yaml
api_platform:
eager_loading:
fetch_partial: true
```
It is disabled by default.
If enabled, Doctrine ORM entities will not work as expected if any of the other fields are used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure to get that sentence, wdym by this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look at fetch_partial docblock in the file and this conversation
But I agree, it is not so clear


#### Force Eager

As mentioned above, by default we force eager loading for all relations. This behaviour can be modified in the
Expand Down