ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reub...@sonic.net
Subject Mapping 3 way join tables
Date Thu, 29 Sep 2005 23:40:25 GMT
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





Mime
View raw message