A: 

Such a change would make it impossible to insert a row with user-specified primary key (e.g. natural primary keys, pre-fetched from a sequence). It can't assume the table already contains the row, just based on the fact that the array contains the primary key.

You can write a new function, similar to createRow, that constructs the row instance with 'stored' => true.

Lukáš Lalinský
That is a fair point. Is there a way to indicate that the row is to be updated/inserted manually? Like a MODIFIED flag or something?
Stuart
+2  A: 

Surely if the entry is a new one you wont have an ID being passed from your form?

Can't you do a quick check if that is null or empty then call an insert rather than the update?

Don't try and do too many things with one method, if they do a different task seperate them out.

Heres an example of my insert / update methods situated in a class which extends Zend_Db_Table (Zend Framework 1.8)

public function insertQuote($quote)
    {
     $data = array('id'=>null,'quote'=>$quote, 'dateCreated'=>NOW());
     $id = $this->insert($data);

     return $id;
    }

public function updateQuote($id, $quote)
    {
     $data = array(
     'quote'=>$quote
     );
     $this->update($data, 'id = ' . (int)$id);
    }
Andi