[Solar-talk] _hasOne Help
Raymond Kolbe
rkolbe at gmail.com
Wed Nov 14 11:56:41 CST 2007
For...
In COMPANY:
$this->_hasOne('market', array(
'foreign_class' => 'MARKET',
'native_col' => 'MARKET_id',
));
In MARKET:
$this->_belongsTo('company', array(
'foreign_class' => 'COMPANY',
'foreign_col' => 'MARKET_id',
));
Does 'native_col' => 'MARKET_id', does MARKET_id have to be the name of
the table col or, would I just keep the table col name 'id'? This is the
part that I think has really confused me when trying to setup my DB and
models.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20071114/f82af836/attachment.html
More information about the Solar-talk
mailing list