Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How would you map this?

Posts: 13
Hibernate Eclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • 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?
Posts: 4107
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • 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.
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic