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 !
|