Hi Niels,
Can we see the definition of
'PurchaseHdrAddr.getPurchaseHdrAddr_shipTo'?
This should definitely work...
Niels :)
-----Original Message-----
From: Voorhoeve, Niels {PBG} [mailto:[EMAIL PROTECTED]
Sent: maandag 20 maart 2006 18:40
To: [email protected]
Subject: Complex property question
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'