[Solar-talk] Added notes on working with Models/Records to thewiki

Rodrigo Moraes rodrigo.moraes at gmail.com
Wed Nov 14 08:17:08 CST 2007


On Nov 14, 2007 12:02 PM, Paul M Jones wrote:
> The magic fetches do not look at the table cols; they just construct
> the query and issue it.

Adding a bit to this, in the example:

    $collection = $model->fetchAllByNameAndOtherName('foo', 'bar');

...the table *needs* to have the columns 'name' and 'other_name'.
Column names are converted from camelCase to underline_separated by
the model. So case matters and the column names must be all lowercase.

-- rodrigo


More information about the Solar-talk mailing list