I have seen some threads talking about a
subclass-field attribute within the <class> of castor
xml. Is there any documentation about that attribute?
For example, I have seen it used like this:
<class name="MyClass" extends="SuperClass"
subclass-field="subclass"/>
My problem with castor xml right now is related to
subclasses.
public class SuperClass {
short aField;
HashMap aHashmap;
}
public class SubClass extends SuperClass {
ArrayList aList;
}
<mapping>
<class name="SuperClass" auto-complete="true">
<field name="aHashmap" handler="MyHandler"/>
</class>
<class name="SubClass" auto-complete="true"
extends="SuperClass"/>
</mapping>
In my code, I use polymorphism so I always have
something like this
SuperClass myClass = new SuperClass(); or
SuperClass myClass = new SubClass();
When the marshalling process completes, there is no
error. However, during unmarshalling, there is an
error: SAXException: unable to find FieldDescriptor
for 'aList' in ClassDescriptor for superClass.
What do I need to do?
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev