ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vamsee Kanakala <vamli...@gmail.com>
Subject Re: SQLMap - Fetching ArrayList within an HashMap result
Date Sat, 19 Mar 2005 05:17:47 GMT
srividhya umashanker wrote:

> <select id="getColumnDetails" resultClass="java.util.ArrayList"
>    SELECT column_id
>      FROM column_details
>      WHERE tree_id = #value#
>  </select>
So, there are multiple column_ids which have the same tree_id. In that 
case, you shouldn't be using "where tree_id = #value#". It should be 
"where tree_id in (#value1#, #value2#)" etc. Change your code according 
to that. I never used resultMaps, but there should be some way to put 
the resulting values from getColumnDetails into a List, which in turn is 
put in the HashMap assigned to a key.


View raw message