Milind Rao wrote:
>
> >> 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.
Well...since the method is called getID...change it to the following:
<class name="test.Level" ... identity="ID"/>
>
> >> 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.
There are a few archives listed on this page:
http://castor.exolab.org/lists.html
--Keith
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev