[Solar-talk] _PostCreate _autoCreate ver0.25 ver0.26?

Rodrigo Moraes rodrigo.moraes at gmail.com
Mon Feb 5 08:41:27 PST 2007


On 2/5/07, Antti Holvikari wrote:
> It's worth mentioning that the reason why I have added the autoconnect
> config key is that I need the tables to be created because some of my
> models depend on those tables; they make direct queries to those
> tables *before* any queries are made within the table models itself.

It makes sense to have something like 'autoconnect' to initialize a
system (start constructing every model just to create the tables) or
when you have new tables. After that, turn it (and 'create') off.
Instead of 'autoconnect', I was doing this to create new tables:

    $table = Solar::factory('My_Model');
    $table->fetch(1);

Which has the same effect: the table doesn't exist; the fetch is only
called to trigger _connect() and create it.

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


More information about the solar-talk mailing list