[Solar-talk] sql_model auto-create

Rodrigo Moraes rodrigo.moraes at gmail.com
Sat Feb 10 07:23:33 PST 2007


On 2/10/07, Jeff Surgeson wrote:
> If table does not exist in your database then when instantiating your data
> model the new model class should create the table as defined by $_table_cols,
> correct?
>
> Using the schema above with no existing "Nodes" table, the call to
> $this->nodes = Solar::factory('Bulldog_Model_Nodes');
> generates a sql error for me.

Although it does not create the table yet, it will read the table
schema in the database if it is created. So for now you can play with
already created tables.

Btw, I guess Paul already saw this, but on SVN fetchOne() returns
fetch('all') (copy & paste from fetchAll() ;), but it should return
fetch('one').

rodrigo
-------------------------------
http://tipos.com.br


More information about the solar-talk mailing list