Skip to content
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
9 changes: 9 additions & 0 deletions en/orm/saving-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand All @@ -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:

Expand Down