-->
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.  [ 2 posts ] 
Author Message
 Post subject: Urgent ! How to implement such relationship with hibernate
PostPosted: Mon Oct 13, 2003 10:39 pm 
Beginner
Beginner

Joined: Tue Aug 26, 2003 11:33 pm
Posts: 38
I have three Types of objects: Test, TestRequirement and Question.
One test relates to many testRequirements.
One test relates to many questions generated according to testRequirements.
One testRequirement relates to many questions.

With relational database, I know I can use one table to contain all the relations, such table has the following columns:
tid-------------test id
qid------------question id
trid------------testRequirement id

What I wanna know is how to map such complex table with hibernate ?
Any help (better with XDoclet tags) is appreciated.

Thanks !


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 14, 2003 3:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I would have thought you would just map the table as you have shown with three one-to-manys . Im not sure what the issue is here. Maybe you should read the parent child documentation and look at XDoclet samples.


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

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.