Hello,
i'm facing a problem when loading a class hierarchy as XML with a dom4j-Session.
I have the following setup:
class A
class B extends A
class C extends A
B and C are mapped as joined-subclasses of A.
When i load a Collection that consists of B's and C's as XML the elements are all named <A>:
Code:
<myCollection>
<A>
<id>1</id>
<attribute-of-B>xyz</attribute-of-B>
</A>
<A>
<id>1</id>
<attribute-of-C>xyz</attribute-of-C>
</A>
</myCollection>
Even when i explicitly set the 'node'-attributes for the joined-subclasses the name of the XML-elements does not change.
The only thing that can be influenced by the 'node'-attribute is the name of the main-class' element (i.e. A -> mySuperclass) but then all B's and C's will again be of the same element.
Does somebody know if this behaviour is intended ?
I would expect that the 'node'-attribute in the mapping can be defined per concrete class and not only per class hierarchy.
Thanks