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

Antti Holvikari anttih at gmail.com
Mon Feb 5 04:32:25 PST 2007


On 2/5/07, Jeff Surgeson <webdev at 3hex.com> wrote:
> Hi Antti
>
> On Monday 05 February 2007 14:00, Antti Holvikari wrote:
> > On 2/5/07, Jeff Surgeson <webdev at 3hex.com> wrote:
> > > What am I missing here, I cant seem to get Solar to auto create tables if
> > > they do not already exist like they used to (pre ver0.25) or get
> > > _prostCreate to insert some data.
> > >
> > Just a quick note without that much investigation; I believe it's
> > because the _connect() has not been called. Take a look at
> > Abovo_Sql_Table[1] where I have added a autoconnect config key to
> > always connect in __construct(). I'm not sure though if this is your
> > problem...
>
> I see that the call to _autoCreate()  is now in the _connect() method and not
> the __construct method as before.
>
> I put in the following in my config file
> $config['Solar_Sql_Table']['autoconnect']       = true;

This config key is just in Abovo_Sql_Table so it won't work for you if
don't use Abovo_Sql_Table :-)

> where and when does _connect() get called?
>
> If I put a call to call _connect() in Solar_Sql_Table __construct() the
> autoCreate() and _PostCreate() then work so you are right _connect() is not
> being called.

...but your table isn't still created? A call to _connect() in
constructor should force it to create the table (and 'create' config
key should also be set).

-- 
Antti Holvikari <http://phphalo.com>


More information about the solar-talk mailing list