Some documentation here:
http://ibatisnet.sourceforge.net/DevGuide.html#d0e997

 

Regards,


Tom Nguyen 
Sr. Developer
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 



________________________________

From: chook rib [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 25, 2007 9:41 AM
To: [email protected]
Subject: Re: Multiple resultsets in data mapper

 

sorry, have a slip, this is right

        <resultMaps>
          <resultMap id="CompanyResult" class="Company">
           <result property="Id" column="CompanyId" />
           <result property="Name" column="CompanyName" /> 
           <result property="Classifications" column="CompanyId"
select="SelectClassifications" lazyLoad="true" />
          </resultMap>
          <resultMap id="ClassificationResult" class="Classification"> 
           <result property="Id" column="ClassificationId" />
           <result property="Name" column="ClassificationName" /> 
          </resultMap>
         </resultMaps>

         <statements>
          <select id="SelectCompanies" resultMap="CompanyResult">
           SELECT CompanyId, CompanyName FROM Company
          </select>

          <select id="SelectClassifications" parameterClass="int"
resultMap="ClassificationResult">
           SELECT CompanyId, ClassificationId, ClassificationName FROM
CompanyClassification INNER JOIN Classification ON
CompanyClassification.ClassificationId=Classification.ClassificationId;
          </select>
        </statements>
         


************************************************************************************
This e-mail message and any files transmitted herewith, are intended solely for 
the
use of the individual(s) addressed and may contain confidential, proprietary or 
privileged information.  If you are not the addressee indicated in this message 
(or responsible for delivery of this message to such person) you may not 
review, 
use, disclose or distribute this message or any files transmitted herewith.  If 
you 
receive this message in error, please contact the sender by reply e-mail and 
delete
this message and all copies of it from your system.
************************************************************************************

Reply via email to