• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How would you map this?

 
Greenhorn
Posts: 13
Hibernate Eclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic