ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Voorhoeve, Niels {PBG}" <niels.voorho...@pepsi.com>
Subject Complex property question
Date Mon, 20 Mar 2006 17:40:19 GMT
Hi,

I have a class PurchaseHeader with several complex address properties
(shipToAddress, chargeToAddress, requestorAddress) that are all keyed by
PurchaseHeader.orderNo.  I am trying to map the addresses to the correct
property, but Ibatis is complaining about my result map (see the result
map below).  Is there a way to map this kind of relationship?  Do I have
to tweak the select to return order_no 3 more times under different
names?

<resultMap class="PurchaseHeader" id="PurchaseHeader-report"
extends="PurchaseHeader-result">
    	<result property="shipToAddress" 
		column="order_no" 
		select="PurchaseHdrAddr.getPurchaseHdrAddr_shipTo"/>

    	<result property="chargeToAddress" 
		column="order_no" 
		select="PurchaseHdrAddr.getPurchaseHdrAddr_chargeTo"/>

    	<result property="requestorAddress" 
		column="order_no" 
		select="PurchaseHdrAddr.getPurchaseHdrAddr_requestor"/>

</resultMap>


<resultMap class="PurchaseHeader" id="PurchaseHeader-result">
	<result property="orderNo" javaType="java.lang.String"
		column="order_no" />
		.
		.
		.
	</resultMap>


The error:
--- Check the PurchaseHeader.PurchaseHeader-report.  
--- Check the result mapping for the 'shipToAddress' property.  
--- Cause: com.ibatis.common.beans.ProbeException: There is no READABLE
property named 'orderNo' in class 'java.lang.String'



Mime
View raw message