[Solar-talk] Sql_Model insert not working!

Jeff Surgeson solar at 3hex.com
Mon Apr 23 08:04:41 PDT 2007


Hi Rodrigo
>     // keep a copy of the data for manipulation (filters, etc)
>     $this->_data = array_merge(
>         Solar::factory(get_class($this))->fetchNew()->toArray(),
>         $this->_data
>     );
>
> Then you will have a record with default values and the new values,
> and insertion will work. I think it is simple as that: add toArray()
> and use a new instance ('master' focus) instead of $this->fetchNew()
> ('record' focus). It works nicely, then.
>
> Let me know if you have problems, because this is solution I'm using
> now and I'm afraid that I'm missing something.

Thanks but I cant get it to work, it does not make sense to me, not your fault 
mine :-( 

Any chance of a more detailed add record? if not I will have to wait until 
Paul comes up with a finished class and some sample code as I am just chasing 
my tail.

-- 
...........::::::...........
Jeff Surgeson / South Africa


More information about the solar-talk mailing list