Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 40118 invoked from network); 30 Sep 2005 16:22:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Sep 2005 16:22:48 -0000 Received: (qmail 53598 invoked by uid 500); 30 Sep 2005 16:22:46 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 53581 invoked by uid 500); 30 Sep 2005 16:22:46 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 53570 invoked by uid 99); 30 Sep 2005 16:22:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2005 09:22:46 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_30_40,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of clinton.begin@gmail.com designates 72.14.204.197 as permitted sender) Received: from [72.14.204.197] (HELO qproxy.gmail.com) (72.14.204.197) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2005 09:22:51 -0700 Received: by qproxy.gmail.com with SMTP id c12so103424qbc for ; Fri, 30 Sep 2005 09:22:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=pF9fGibwZi9EQjep8fhtfH46M2oHcPunXrcIt1+zF7iuW0qpYOyuDVDyrHrE4PWAFn1JMZkKml9AoGfKcl81JGJhlDdHxnbVUDoXpIaaG1CtOqC6++RAo0D1xmHI+TJy8Nv8KAlu8/WM88DWfmrKR7zIZGPY08jHpjM84003gqo= Received: by 10.64.204.1 with SMTP id b1mr1025799qbg; Fri, 30 Sep 2005 09:22:24 -0700 (PDT) Received: by 10.64.10.17 with HTTP; Fri, 30 Sep 2005 09:22:24 -0700 (PDT) Message-ID: <16178eb10509300922r14db2e4s23ba04c66ed9fb98@mail.gmail.com> Date: Fri, 30 Sep 2005 10:22:24 -0600 From: Clinton Begin Reply-To: Clinton Begin To: user-java@ibatis.apache.org Subject: Re: Mapping 3 way join tables In-Reply-To: <7169.216.239.124.38.1128037225.squirrel@webmail.sonic.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4293_18102470.1128097344298" References: <7169.216.239.124.38.1128037225.squirrel@webmail.sonic.net> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_4293_18102470.1128097344298 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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, reubenf@sonic.net 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 > > > > > ------=_Part_4293_18102470.1128097344298 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
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, b= ut it's easier to just ask.

Clinton


On 9/29/05, reubenf@sonic.net <reubenf@sonic.net> wrote: Hello,

I have tables A, B and C, which are related via table A_B_C:<= br>
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
i= nstances of B & C, ideally mapped in a hashmap as follows:

{B -&= gt; 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 w= orkaround?

Thanks
Reuben





------=_Part_4293_18102470.1128097344298--