[Solar-talk] sql_model auto-create

Paul M Jones pmjones at ciaweb.net
Sat Feb 10 05:10:52 PST 2007


Hi Jeff,

> Have been playing with the new sql_model stuff, and guess what? I  
> cant make it
> auto create a table if it does not exist, whats new with me! :-)

It's not you; the creation stuff isn't working yet.

> Am I correct in saying with the new model class only uses auto- 
> increment and
> not sequences any more at all? (bummer Paul I know how much you liked
> them) :-)

For now, yes; I'm going to try to make it use both, but auto- 
increment will be the main use instead of a sequence.  This breaks a  
long-time habit for me, but auto-inc does seem to be the far more  
popular system.


> 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?

It will in the future, but does not right now.


> Is this me or is there still some work to do on the auto creation  
> code?

There is.  Very sorry to have misled everyone on that.  (There's a  
lot of work left to do on many parts of the new Model, actually, I  
just wanted to get it out there so everyone could comment and critique.)




--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.  <http://solarphp.com>

Join the Solar community wiki!  <http://solarphp.org>

Savant: The simple, elegant, and powerful solution for
templates in PHP.  <http://phpsavant.com>




More information about the solar-talk mailing list