Hi all,
Is it possible to marshall an array field without having a setter in
a class?
I've created the following sample class:
public class Mapped
{
private String[] _name = new String [] {"a"};
public String[] getNames() { return _names;}
}
When I tried to marshall it with the default mapping it succeded. With
my own mapping:
<mapping>
<class name="Mapped">
<field name="names" type="string" collection="array"/>
</class>
</mapping>
I got the following error:
org.exolab.castor.mapping.MappingException: The method setNames in class
Mapped accepting/returning
object of type class [Ljava.lang.String; was not found
at
org.exolab.castor.mapping.loader.MappingLoader.createFieldHandler(MappingLoader.java:882)
...
The message is true but why it appeared? I don't need any setter to only
marshall an object...
Looking forward for your help,
Pawel Rzepa
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
