Cakephp Beforesave() Gotcha: Need To Set $this->__exists To True If Setting A Primary Key
Posted in cakephp, development, php on Feb 18th, 2010
if you add a primary key which would turn an “insert” into an “update” within beforeSave() you’ll need to set $this->__exists = true;… the call to $this->exists(); happens in model.php before the callback to beforeSave().