ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nguyen, Tom" <Tom.Ngu...@rels.info>
Subject RE: Multiple resultsets in data mapper
Date Fri, 25 May 2007 14:41:10 GMT
Some documentation here:
http://ibatisnet.sourceforge.net/DevGuide.html#d0e997

 

Regards,


Tom Nguyen 
Sr. Developer
tom.nguyen@rels.info <mailto:tom.nguyen@rels.info> 



________________________________

From: chook rib [mailto:chookrib@gmail.com] 
Sent: Friday, May 25, 2007 9:41 AM
To: user-cs@ibatis.apache.org
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.
************************************************************************************

Mime
View raw message