players table has "team_id" field.
app/models/team.php
var $hasMany = array(
'Player' => array( 'className' => 'Player' ),
);
app/models/player.php
var $belongsTo = array(
'Team' => array( 'className' => 'Team' ),
);
On Jul 7, 5:06 am, rtanz <[EMAIL PROTECTED]> wrote:
> hi i am confused how to use these two associations, say i have a
> football team and a set of players, both in their own table. now would
> i say that players belong to a football team or a football team has
> many players? thanks
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---