ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yee, Richard K CTR DMDC" <Richard.Yee....@osd.pentagon.mil>
Subject RE: Return result as Map
Date Wed, 21 Jun 2006 22:56:53 GMT
Try using queryForList instead of queryForMap

-Richard

-----Original Message-----
From: jaybytez [mailto:jaybytez@gmail.com] 
Sent: Wednesday, June 21, 2006 2:51 PM
To: user-java@ibatis.apache.org
Subject: RE: Return result as Map



Here is my query:

  <select id="queryMapFacilityServiceLookup"
resultClass="java.util.HashMap">
    <![CDATA[
      SELECT facility_service_desc, facility_service_code
      FROM facility_service_lookup
    ]]>
  </select> 

And here is how I call it:

Map mappedValues =  sqlMap.queryForMap("queryMapFacilityServiceLookup",
null, "facility_service_desc","facility_service_code");

And i get a Map back with null values and one row.
--
View this message in context:
http://www.nabble.com/Return-result-as-Map-t1824496.html#a4983369
Sent from the iBATIS - User - Java forum at Nabble.com.

Mime
View raw message