Hi,
i have my problems with mapping the following....How would you map this in the hmb.xml - files??
The EntityRelationshipModel of the DB is:
Table Question: question_id Primary Key
text
Table Options: option_id Primary Key
question_id Primary Key, Foreign Key referencing Question
option_text
My Problem is, that the primary key of table Options consists of two colums....I know, there is the composite-id - Tag, where I can wrap the question_id and the option_id in an own class....but how can I relate this to the table Question and above all, how would I overwrite equals() and hashCode() in these Classes...??.
I would be very thankful, if anybody could provide me the mapping files for the problem above, cause I have read the docs up and down..but I cannot really find a solution for this...it would be a great help for me..
THANK YOU!
|