>> 1. What I'd like to get on Marshalling a Member is an XML that looks like
>> <Member mid="2" lid="2">
>> ie. I want the level ID, not the Level object. Do I have to write my own
>> FieldHandler for this
>> or is there some way to do this in the XML Mapping file?
>
>You can do that in the XML Mapping file...
>
>add reference="true" to the field mapping as such:
>
><field name="Level" type="test.Level">
> <bind-xml name="lid" node="attribute" reference="true"/>
></field>
>
>and make sure you mark the identity field for the test.Level class
>mapping:
>
><class name="test.Level" ... identity="Id"/>
That didn't work. I get a mapping exception
"No field descriptor found for the identity field ID in class test.Level"
BTW, the getID method returns an Integer not an int.
>> There are no sample files on how to write the FieldHandler. I have gone through
>> the archives and got very
>> confused. Is there any sample code for FieldHandlers somewhere.
>
>There should be samples in the archives...but I'll place one up on the
>FTP server later when I get some time.
Which archives? I couldn't find anything on the site.
Regards
Milind
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev