ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mkhitaryan, Aram" <Aram.Mkhitar...@lycos-europe.com>
Subject RE: N question
Date Thu, 24 Aug 2006 07:29:31 GMT
You have to use select attribute and specify one select which will get data for list and put
in map (for this you have to write one additional result map).

In documentations it is described in details how to use select and result-map attributes
in result maps.

Best,
Aram


-----Original Message-----
From: Daniel Pitts [mailto:Daniel.Pitts@cnet.com] 
Sent: Thursday, August 24, 2006 1:57 AM
To: user-java@ibatis.apache.org
Subject: M:N question

I have something like the following:

class Foo {
      Integer fooId;
      String name;
	Map<Integer, List<Integer>> bar = new HashMap<Integer,
List<Integer>>();
      // getters/setters bellow.
}

Table foo has (fooId, name) and table barMap has (fooId, a, b)

<select id="getFoo" resultMap="fullFoo">
   SELECT * from foo join barMap using (fooId) WHERE fooId = #fooId#
</select

My question is... What would the resultMap have to look like to handle
"bar"
Or can it handle it directly?
Mime
View raw message