From 93af107e79048d6444f35844def1aac3610bea37 Mon Sep 17 00:00:00 2001 From: Arthur Edamov Date: Mon, 21 Oct 2019 10:40:57 +0300 Subject: [PATCH] fetchPartial documentation I'm not sure if I should also document `fetchPartial` attribute at the resource level and provide an example. --- core/performance.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/performance.md b/core/performance.md index aba3dd0cf83..293b5b56116 100644 --- a/core/performance.md +++ b/core/performance.md @@ -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. + #### Force Eager As mentioned above, by default we force eager loading for all relations. This behaviour can be modified in the