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
12 changes: 6 additions & 6 deletions en/orm/saving-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,6 @@ 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 @@ -234,6 +228,12 @@ should be marshalled. Alternatively, you can use dot notation for brevity::
'associated' => ['Tags', 'Comments.Users']
]);

You may also disable marshalling of possible nested associations like so::

$entity = $articles->newEntity($data, ['associated' => []]);
// or...
$entity = $articles->patchEntity($entity, $data, ['associated' => []]);

Associated data is also validated by default unless told otherwise. You may also
change the validation set to be used per association::

Expand Down