ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Malecki" <misie...@poczta.onet.pl>
Subject Re: ResultMap as a HashMap?
Date Tue, 26 Jul 2005 14:23:53 GMT
Impossible - two identical questions on the same day, anyone else?

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

the second one is exactly for yous needs
Michal Malecki
----- Original Message ----- 
From: "Eduardo Piva" <eduardo@gwe.com.br>
To: <user-java@ibatis.apache.org>
Sent: Tuesday, July 26, 2005 3:04 PM
Subject: ResultMap as a HashMap?

> 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

View raw message