From 57b0182f86f65de2133b90a10fa8c06701fd3d60 Mon Sep 17 00:00:00 2001 From: Ahmed omar Date: Mon, 13 Mar 2017 13:28:25 +0200 Subject: [PATCH] fix the order of text blocks the two blocks related to associations were not following each other under title "Converting Request Data into Entities" --- en/orm/saving-data.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/en/orm/saving-data.rst b/en/orm/saving-data.rst index 91555e0d8c..f2558cb5e3 100644 --- a/en/orm/saving-data.rst +++ b/en/orm/saving-data.rst @@ -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:: @@ -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::