I'd say that it doesn't matter that there will not be a GoalieStat record for some players. If there is an associated record, then it will show up.
Teams -> hasManyPlayers Players -> hasPlayerStats, hasGoalieStats PlayerStats -> belongsToPlayers GoalieStats -> belongsToPlayers I'm of course assuming that the models will handle any missing records with grace. :) On 8/18/06, Scott Sharkey <[EMAIL PROTECTED]> wrote: > > Hi All, > > I'm working on a hockey league website, and need some ideas on the best > way to handle this situation: > > I have models for Teams, Players, PlayerStats, GoalieStats. There will > only be one entry in either PlayerStats or GoalieStats, depending on > whether the player is a goalie or a skater. I think I need to create > the corresponding record in one of the Stat's tables when the Player is > created. So, what's the best way to do that? > > Does it matter that there will not be a "GoalieStat" record for some > players, and vice versa? Or should I create empty records for both, > then just fill in the appropriate one and ignore the other? > > Suggestions welcomed! > > -Scott > > > > -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never have." -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
