-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Relation with more than 2 columns
PostPosted: Wed Aug 24, 2011 12:45 pm 
Newbie

Joined: Sun Jul 03, 2011 3:09 pm
Posts: 3
Hi all,
I've a problem with a relationship that have more than 2 join columns.

The scenario is as follows. The underlined text is primary key

Shooters (shooterId,name)
Matches(MatchId,name)
Categories(CategoryId,name)

In fact, one shooter can join on multiple matches. And one shooter can join on multiple categories for the same match. So I need the following table

Registration(shooterId,MatchId,CategoryId,score)

If I had only two table, I know how to solve this scenario with ManyToMany relationship. I use always the Annotations and I've found some examples that explain the case of two tables, but not for more than two tables.
Now, in this case I've three table and I don't understand how to solve this problem.

thanks to all the people who help me


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.