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: Mapping multiple records to key-value pair
Date Tue, 26 Jul 2005 11:35:17 GMT
Sure,
you have two methods in SqlMapExecutor:
queryForMap(String id, Object parameterObject, String keyProp)
queryForMap(String id, Object parameterObject, String keyProp, String
valueProp)

the second one is exactly for yous needs

Regards
Michal Malecki
----- Original Message ----- 
From: "Kinjal Sonpal" <forwardtokinjal@gmail.com>
To: "iBatis mailing list" <user-java@ibatis.apache.org>
Sent: Tuesday, July 26, 2005 12:55 PM
Subject: Mapping multiple records to key-value pair


Dear All,

My select query returns a typical set of key-value pairs.

In plain jdbc world, I would run a while loop and
map.put(resultSet.getString("mykey"), resultSet.getString("myvalue")
would serve.

Is it possible to get the same effect with iBatis?

Thanks and regards,
Kinjal Sonpl



Mime
View raw message