diff --git a/en/orm/saving-data.rst b/en/orm/saving-data.rst index cbfb204b53..f76ac22275 100644 --- a/en/orm/saving-data.rst +++ b/en/orm/saving-data.rst @@ -211,6 +211,12 @@ associations should be marshalled:: ] ]); +You may also disable marshalling of possible nested associations like so:: + + $entity = $articles->newEntity($data, ['associated' => []]); + // or... + $entity = $articles->patchEntity($entity, $data, ['associated' => []]); + The above indicates that the 'Tags', 'Comments' and 'Users' for the Comments should be marshalled. Alternatively, you can use dot notation for brevity:: @@ -237,6 +243,9 @@ change the validation set to be used per association:: ] ]); +The :ref:`using-different-validators-per-association` chapter has more information on how to +use different validators for associated marshalling. + The following diagram gives an overview of what happens inside the ``newEntity()`` or ``patchEntity()`` method: