ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "srividhya umashanker" <srividh...@gmail.com>
Subject Re: SQLMap - Fetching ArrayList within an HashMap result
Date Sat, 19 Mar 2005 04:28:53 GMT
I use the queryForList() for the outer Select.  but still get the same
problem.
The problem occurs only when i use  another linked select

<resultMap id="result-tree1" class="java.util.HashMap">
....................
<result property="column_id" column="tree_id"  select="getColumnDetails" />
....................
</resultMap>


where the getColumnDetails returns an arrayList.

 <select id="getColumnDetails" resultClass="java.util.ArrayList"
parameterClass="int">
    SELECT column_id
      FROM column_details
      WHERE tree_id = #value#
  </select>

The problem occurs only when the getColumnDetails is executed. The API
inturn uses executeQueryForObject()
instead of queryForList(). How do i control the Method call in the linked
select?




----- Original Message ----- 
From: "Vamsee Kanakala" <vamlists@gmail.com>
To: <ibatis-user-java@incubator.apache.org>
Sent: Saturday, March 19, 2005 9:55 AM
Subject: Re: SQLMap - Fetching ArrayList within an HashMap result


> srividhya umashanker wrote:
>
> > /But it throws executeQueryForObject() returns too many rows
Exception../
> > //
> > //
> > /How to go about it??/
> > / /
>
> You should use queryForList, which will give a List of HashMaps.
>
> Vamsee.


Mime
View raw message