var $belongsTo = array(
'Category' =>
array('className' => 'Category',
'conditions' => '',
'order' => '',
'foreignKey' => '',
'counterCache' => ''),
'Language' =>
array('className' => 'Language',
'conditions' => '',
'order' => '',
'foreignKey' => '',
'counterCache' => ''),
'User' =>
array('className' => 'User',
'conditions' => '',
'order' => '',
'foreignKey' => 'created_by',
'counterCache' => '')
);
On Apr 24, 12:27 pm, Dovdimus Prime <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I'm beginning with CakePHP. I understand that in defining a model, you
> can specify a foreign key relationship (in this case to a parent
> table) by setting the $belongsTo variable.
>
> The obvious question is: how do you specify two parent tables? What if
> an Employee model has a Site parent model and a Department parent
> model? You would need two $belongsTo variables to specify these
> relationships...
>
> Thanks
>
> David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---