By default all the associations on this table will be hydrated. You can
limit which associations are built, or include deeper associations
using the options parameter:
$articles = $this->Articles->newEntities(
$this->request->data(),
['associated' => ['Tags', 'Comments.Users']]
);
You can limit fields that will be present in the constructed entities by
passing the fieldList option, which is also accepted for associations:
$articles = $this->Articles->newEntities($this->request->data(), [
'fieldList' => ['title', 'body', 'tags', 'comments'],
'associated' => ['Tags', 'Comments.Users' => ['fieldList' => 'username']]
]
);
You can use the Model.beforeMarshal event to modify request data
before it is converted into entities.