search
top

Prevent data from being overwritten in your controller save action

Before you perform your save, execute a create first. This prevents data from being overwritten due to an ID being set that you didn’t know about.

$this->Model->create();
$this->Model->save($aYourData);

top