ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Example of a queryForMap() call
Date Tue, 02 Aug 2005 16:15:53 GMT
In the given example below ....

     <select id="getStudentNames" parameterClass="map">
         select
             student_id as studentId
             student_name as studentName
         from
             students
         where
             student_id in  (
                 <iterate property="parentIds" conjunction=",">
                     #studentIds[]#
                 </iterate>
             )
     </select>


How could I end up with a Map keyed by studentId and the value be  
their name?

What should be the resultClass?

Is this the correct call?

queryForMap("getStudentNames", parameterMap, "studentId");


Once the examples are in I can put them up on the FAQ site.

Nathan

Mime
View raw message