CakePHP model updating instead of inserting.

Posted by on February 19, 2009

Cake 1.1’s documentation is a little lacking, again.

I was having a bug where a model was updating instead of inserting, even though I was sending in an array with all of the model’s attribute except for the id. In order to get the save function to insert instead of update, I had to explicitly set the model’s id to ‘null’.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments

Comments: