I'm currently using Cake to add additional functionality to an old PHP
app dealing with sports.  I can't seem to get the 'games' table
associated with 'teams'.

'Games' has two foreign keys, 'games_home_teams_id' and
'games_away_teams_id', both of which refer to 'teams_id', a primary
field.  I tried the following, which Cake didn't like:

var $hasMany = array(
   'Game' => array(
      'className' => 'Game',
      'foreignKey'  => array('games_home_teams_id',
'games_away_teams_id')
   )
);

And I can't do this either, or PHP will throw a fit (duplicate key
names):

var $hasMany = array(
   'Game' => array(
      'className' => 'Game',
      'foreignKey'  => 'games_home_teams_id'
   ),
   'Game' => array(
      'className' => 'Game',
      'foreignKey'  => 'games_away_teams_id'
   )
);

Since I'm only adding new functionality, modifying the database schema
for these two is not an option.  I can create new tables, but I can't
change existing ones or create views.  Any suggestions?  I've got less
than 24 hours to finish this thing :-/  Thanks

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to