Chris, Thanks for your response. Can you please explain a little more? My games database has two columns, "home" and "visitor", that specify the names of the teams that played the game. To do a
Game belongsTo Team association I need one foreignKey but in this case I have two possible foreignKeys, "home" and "visitor". How will the above associations work in my case? Do I need to change my database structure? Please see database table listing below. Thanks. GAMES ====== `id` varchar(16) NOT NULL default '', `season_id` varchar(16) NOT NULL default '', `gamedatetime` datetime NOT NULL default '0000-00-00 00:00:00', `home` varchar(255) NOT NULL default '', `visitor` varchar(255) NOT NULL default '', `homescore` int(11) NOT NULL default '0', `visitorscore` int(11) NOT NULL default '0', `winner` varchar(16) NOT NULL default '', `created` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`) TEAMS ====== `id` varchar(16) NOT NULL default '', `city_id` varchar(16) NOT NULL default '', `name` varchar(255) NOT NULL default '', `played` int(11) NOT NULL default '0', `wins` int(11) NOT NULL default '0', `losses` int(11) NOT NULL default '0', `draws` int(11) NOT NULL default '0', `description` text NOT NULL, `created` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
