cakephp/docs — pull request #1440 by johannesnagl (2014-06-24 10:18:51+00:00)
Title: don't forget to call clear() instead of create()

we had a problem in one of our apps:

let's assume the following code:

foreach ($posts as $post) {
$this->Post->create();
$this->Post->id = $post['Post']['id'];
$this->Post->save(['column3' => 'foo', 'column4' => 'bar']);
}

When calling create() instead of clear(), cakePHP saves default values to columns, which are not part of the save()-call. (e.g. 'column1' defaults to boolean false, but can have changed to "true" due to another save-operation).

When calling clear(), cakePHP saves only the mentioned columns.