Sorry if I was unclear. A is a parent object which owns B and C children. A has a certain set of Bs each mapped against a set of Cs. A:B is many to many. B:C is many to many. A:C is many to many.
For the interim I am using ResultMaps to build an inner class (BC) of A, which holds one B and a list of Cs. It works, but I would prefer to avoid the necessity of this class, and be able to directly pass {B, C[]} to the A bean. Does that clarify things? Thanks Reuben > Can you clarify the cardinality of the relationships between the A,B,C > data > model, and also clarify the exact object graph you want to map it to? > > I'm sure there's a way to derive it from the information you've provided, > but it's easier to just ask. > > Clinton > > > On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> I have tables A, B and C, which are related via table A_B_C: >> >> A: >> a_id >> >> B: >> b_id >> >> C: >> c_id >> >> A_B_C: >> a_id >> b_id >> c_id >> >> I have beans representing A, B & C, but I would like to avoid having a >> bean representing A_B_C. That is, A (the owner) would ideally have >> instances of B & C, ideally mapped in a hashmap as follows: >> >> {B -> C[]} >> >> How can I express this with resultMaps? Is it possible? It would seem to >> imply that I need a setter method: >> >> A#setBCRelationship(B b, C c) >> >> ...but this does not seem permissible with Ibatis. Anybody have a >> workaround? >> >> Thanks >> Reuben >> >> >> >> >> >