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 value.

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 <[EMAIL PROTECTED]> 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.


Reply via email to