That mapping should work as is, as you have specified both the add as well as 
the iterate* method correctly. What problems are you seeing ? 

Werner

> -----Ursprüngliche Nachricht-----
> Von: Claudio Di Vita [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 10. Mai 2007 11:08
> An: [email protected]
> Betreff: Re: [castor-user] Advanced collection mapping ??
> 
> > Sure. What does your mapping file look like currently ?
> 
> <mapping>
>     <class name="org.example.Foo">
>         <map-to xml="Foo" />
>         <field name="bars" collection="collection" get-
> method="iterateBars"
>               set-method="addBar" type="string">
>             <bind-xml name="bar" node="element" />
>        </field>
>     </class>
> </mapping>
> 
> > PS It might be that you are going to need a proper getBars() method, but
> I am not 100%
> > sure.
> 
> I think so because, I have also tried the method described in
> http://www.castor.org/how-to-map-a-hashtable.html, but it returns the
> following exception (obviously I have changed the class type of fiel
> bars):
> 
> Invalid mapping: The method addBar in class org.example.Foo
> accepting/returning object of type class
> org.exolab.castor.mapping.MapItem was not found
> 
> Moreover I've tried to use a nested class for specify the mapping, but
> seems that Castor cannot found it.
> 
> Thank you,
> 
> Claudio
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to