Chris Hartjes wrote: > 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. :)
That's kind of what I'm assuming. I still think I want to create the associated record when the Player is created. That way I don't have to worry about the record not existing, and handling special cases, etc. Not real sure how to do that just yet, but I have some ideas - just need to try them out. -Scott > > 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 >> > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---