ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: ResultMap as a HashMap?
Date Tue, 26 Jul 2005 13:22:43 GMT
Quoting Michal Malecki:

"Sure,
you have two methods in SqlMapExecutor:
queryForMap(String id, Object parameterObject, String keyProp)
queryForMap(String id, Object parameterObject, String keyProp, String 
valueProp)"

These do exactly what you are asking for..

Larry


On 7/26/05, Eduardo Piva <eduardo@gwe.com.br> wrote:
> 
> Hi list,
> 
> I'm trying to do a resultMap but I can't figure if iBatis support what I'm 
> trying to do. I need to do a select that will return a resultSet with 2 
> columns and n rows. I want to use this result to populate only one hashmap, 
> using the first column as the key value and the second column as the value. 
> So, I'll end doing a queryForObject, even if my resultSet is a List, because 
> iBatis will iterate over my List and create a hashMap.
> 
> Is it possible?
> 
> Thanks!
> 
> ----
> Eduardo Piva
> GWE Software
> +55 (19) 3254-7633
> +55 (19) 8114-9488
> www.gwe.com.br <http://www.gwe.com.br>
> 
>

Mime
View raw message