I want to create a tournament application with cakePHP and I need some help to create Database and linking Models correctly.
My ultimate goal is :
- add/edit/delete teams (i dont need list of players)
- add/edit/delete matchs with 2 teams per match
- display a list of match with results (ex: match5 : TeamAname **2** vs **0** TeamBname)
I dont really know how to organise models and sql tables, for the moment i see 2 tables :
- teams
- matches
Did i need another table between the two tables (ex: matches_teams) or i can use teamA_id and teamB_id in my matches table ? Does CakePHP support multiple foreign keys in same model ?
I want to know if someone has already developed this kind of project in cakePHP, and if it work fine and logically (without tricks).
Thanks!