Mark,
If you use deriveByClass you also need "<map-to/>" element in your
package.Person class mapping eg:
<class name="package.Person">
<map-to xml="person"/>
...
</class>
Did you try that?
--Keith
Mark Priatel wrote:
I'm having problems mapping deriveByType elements into an
java.lang.Object propery. Any help would be appreciated!
I have a class:
class BodyElement{
String id;
Object body;
set/get methods...
}
class Person{
String name;
}
---------- With mapping:
<class name="package.BodyElement">
<map-to xml="body-element" />
<field name="id" type="string">
<bind-xml name="id" node="attribute" />
</field>
<field name="body" type="java.lang.Object">
<bind-xml auto-naming="deriveByClass" node="element" />
</field>
</class>
<class name="package.Person">
.. no problems here.
</class>
---------- With Input:
<body-element id="001" >
<person name="foo" />
</body-element>
if I change the type to 'package.Person' instead of 'java.lang.Object'
this works. I figured the deriveByClass automatically determined the
type, and then would map it to the body property...
I've tried using 'location' 'set-method=setBody' etc...I'm sure I'm
missing something simple.
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------