JAXB-ElipseLink: Preventing marshalling of inherited property
-
29-10-2019 - |
Question
Again i am having an EclipseLink 2.3 marshalling-usecase that seems to be quite trivial but not working as expected:
I have an abstract base class which defines a property getX(). I have several child-classes derived from this base-class that inherit this property.
On marshalling the child-classes this property is marshalled as well for every child-class. However, for one specific child-class i want to prevent marshalling of this property.
I tried:
@Override
this property in the child-class and setting it@XmlTransient
- Specifying
<xml-transient java-property="X">
in the oxm.xml for the child-class.
Both to no avail, the property is always marshalled - how is this supposed to work?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow