ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Debasish Dutta Roy" <debasish.dutta...@gmail.com>
Subject Re: Return result as Map
Date Wed, 21 Jun 2006 19:32:01 GMT
Map will work.

1. You have to mention as java.util.HashMap as has been mentioned by Niels.
Here point to be noted if you do not give a concrete class then iBATIS does
not know what to instantiate and should give exception, I have received this
exception. So I suspect there is something else that is wrong before this
piece of code is executed.

2. Your java code mention which one you want as key and which one as a

e.g. sqlMap.queryForMap("selectFacilityServiceLookup", null,
"facility_service_code", "facility_service_desc");

It simply has to work, I use this everyday.

On 6/21/06, jaybytez <jaybytez@gmail.com> wrote:
> It did not work and I received no exceptions.  It just returned no
> results.
> Therefore, I switched my code and created a simple TO that had only the
> two
> fields in it.  And then had to create a search mechanism on the TO since
> it
> does not have the Map lookup capabilities to find the value of a key.
> Thanks,
> -jay
> --
> View this message in context:
> http://www.nabble.com/Return-result-as-Map-t1824496.html#a4980225
> Sent from the iBATIS - User - Java forum at Nabble.com.

View raw message