-->
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: Bidirectional one-to-many relation problem
PostPosted: Sun Oct 12, 2008 7:17 pm 
Newbie

Joined: Sun Oct 12, 2008 7:12 pm
Posts: 1
Hi there,

I have 2 classes to relate in a one-to-many bidirectional relationship.
-------------------------------
Class Question:

List<Choice> fewChoices;

Class Choice:

Question question;
-------------------------------
I have done the annotations to the relation successfully. The problem comes when I had one more list of choices to the Question class.
-------------------------------
Class Question:

List<Choice> fewChoices;
List<Choice> manyChoices;

Class Choice:

Question question;
-------------------------------
In this situation what kind of annotations should I do? I need 2 different tables for this 2 different lists, I think. I cant just mix all toghether in one single table and I cant use 2 different classes: FewChoice and ManyChoice. I dont know what annotations should do. Thanks in advance.


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.