[Solar-talk] Added notes on working with Models/Records to thewiki
Paul M Jones
pmjones at ciaweb.net
Wed Nov 14 08:02:00 CST 2007
On Nov 14, 2007, at 7:55 AM, Kilbride, James P. wrote:
> Do you have to define the columns of the table in the _setup for the
> magic fetchs to work or will it use reflection to do that?
Technically, you don't need to define $this->_table_cols at all --
Solar_Sql_Model inspects the database for those. The column defs are
used for creating the table, and for documenting the expected
schema. (At some point in the future we'll compare the defined
columns with the actual ones and raise notices if they don't match.)
The magic fetches do not look at the table cols; they just construct
the query and issue it.
Does that help at all?
--
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