-->
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: Having trouble mapping an association
PostPosted: Wed Dec 07, 2005 1:49 pm 
Newbie

Joined: Fri Aug 12, 2005 12:13 pm
Posts: 5
Say you have objects A, B, C. Database table tbA has no reference to tbC. Instead tbB acts as a linking table between the two.
Every A has exactly one B.
Each B may have a C ( or none )
More than one B can share a C.
tbB is as follows:
tbB(
A_ID INT,
B_ID INT
)
To give this an example.
A might be fathers. B children and C favourite colour.
Every father has a child and each child may have at most one favourite colour ( or none ). Clearly different children may have the same favourite colour.
I want load C with A when A is loaded.
Can anyone help me with the mapping for this?
Many thanks

Kevin


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.