[Solar-talk] Sql_Model insert not working!

Rodrigo Moraes rodrigo.moraes at gmail.com
Sat Apr 7 03:07:30 PDT 2007


On 4/7/07, Jeff Surgeson wrote:
> Dont know if anyone else has tried inserting a row using Sql_Model class in
> svn but it does not seem to work as is without some modification. I assumed
> that as it was in svn that the insert/update methods worked but it would
> appear not, I see Paul also has todo: notes at top of class "@todo Add
> master-focus insert, update, and delete" however they appear to be completed?

I have the same doubt. I tried to save using $model->save($data) or
$record->save() and got ERR_FOCUS_NOT_* exceptions in both cases.

> In order to get it to insert a new row I had to comment out
> $this->_data = array_merge(
>   $this->fetchNew()->toArray(),
>   $this->_data
> );

Yes, commenting it out, insertion worked.

rodrigo


More information about the solar-talk mailing list