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
|