I'm going to develop a web application that keeps track on basketball statistics. Currently I'm at the beginning of it all and I have a question for you guys, how would you map this classes.
I have a class Clubs with a mapping OneToMany to a class Players.
Then I'm thinking of making a class Game that will have a game id and two clubs that are playing a game.
I also need a class Statistics that will have records of free throws attempts/scored, two points attempts/scored......
To clear things up let me explain how the application should look like: When clubs and it's players are inputed, you should make a game that would have it's id.
Then when selecting a game you should be able to select players from the both teams that have played the game, and continue to the page where you should actually enter the statistics.
On that page you should see the 2 teams and their players with input field for statistics - free throw attempts/scored... I hope you get the idea....
Can somebody help?
Rather than thinking about the mapping first I'd suggest you get the domain model right, then worry about mapping. When you have the domain model correct you can see the available options for mapping and then make appropriate changes if necessary.