On Sep 12, 2006, at 1:35 PM, Tony wrote:
>
> Okay I just thought of something John. If I'm doing a $hasMany in the
> Level model will I also need to do a $belongsTo in the Role model?
Yeah, if you want to see Level data from a Role model perspective.
> Would I do the same thing and just use
>
> class Roles extends AppModel
> {
>
> var $name = 'Roles';
> var $belongsTo = array('Level' => array('className' => 'Level',
>
> 'condition'
> => '',
> 'order'
> => '',
>
> 'foreignKey' => 'role1_id'
> ),
> 'Level2' => array
> ('className' =>
> 'Level',
>
> 'condition'
> => '',
> 'order'
> => '',
>
> 'foreignKey' => 'role2_id'
> )
> );
> }
>
>
> Am I close here?
Yeah - does it work? That's the best way to try. ;o)
-- John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---