Does anyone have a way to do this?


I'm looking to do sub-object selection, where the object is accessed as...

class Location {
        getLocationMapping()
        setLocationMapping(LocationMapping lm)
}

class LocationMapping {
        getURL()
        setURL(String urlToSet)
}

with a mapping that does...

<field name="LocationDetails.url" get-method="getURL" set-method="setURL">
<bind-xml name="url"/>
</field>


... won't work, because it's looking for getURL and setURL on the wrong object; even though I've specified the sub-object.

Is this a bug, a misfeature, or am I not doing something correctly? Nothing clear in the documentation on how it should behave, or whether it should or should not work.

On 18 Mar 2004, at 16:52, Gregory Block wrote:


I'd like to create a mapping that does something like the following...



<class name="com.wow.framework.dao.Location">
<field name="id" type="integer" get-method="getID" set-method="setID">
<bind-xml name="id" node="attribute" type="location-id-type"/>
</field>
<field name="name" type="string">
<bind-xml name="name" />
</field>
<!-- No alternate names yet. -->
<field name="parent" type="com.wow.framework.dao.Location">
<bind-xml name="parent-location" type="wow-types:location-type"/>
</field>
<field name="LocationDetails.displayAddress">
<bind-xml name="address"/>
</field>
<field name="LocationDetails.url" get-method="getURL" set-method="setURL">
<bind-xml name="url"/>
</field>
<field name="LocationDetails.phone">
<bind-xml name="tel"/>
</field>
<field name="LocationDetails.fax">
<bind-xml name="fax"/>
</field>
<field name="LocationDetails.email">
<bind-xml name="email"/>
</field>
</class>


Now, I appear to get the correct behavior for phone, fax, and e-mail - those fields aren't, at least, reporting any grave errors. However, LocationDetails.url isn't reachable; no matter what I do, it insists on looking in the Location object for the getURL() and setURL() calls.

Anyone have any idea how I can convince it to look at the sub-object?

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to