Community
Participate
Working Groups
We need to support object reference / collection reference mappings via choice mapping. In xml, this will involve modifications to xml-elements - we will need to add an element ref to xml-join-nodes. There is currently a bug open to track supporting used of xml-idref with xml-elements - this fix will involve adding reference mapping support to our choice mappings. Once this is resolved we can add support for xml-join-nodes on xml-elements.
This is a non-trivial fix and will require additional annotation support. More than likely we will need to wrap @XmlJoinNodes such that each entry in the @XmlElements list has an associated @XmlJoinNodes entry: @XmlElements({ @XmlElement(name="a", type=Address.class), @XmlElement(name="b", type=Phone.class), @XmlElement(name="c" type=Contact.class), }) @XmlJoinNodesList({ @XmlJoinNodes({ @XmlJoinNode(xmlPath="add/@id", referencedXmlPath="@id"), @XmlJoinNode(xmlPath="add/city/text()", referencedXmlPath="city/text()") }) @XmlJoinNodes({ @XmlJoinNode(xmlPath="phn/@id", referencedXmlPath="@id"), @XmlJoinNode(xmlPath="phn/area/text()", referencedXmlPath="area/text()") }) @XmlJoinNodes({ @XmlJoinNode(xmlPath="con/@id", referencedXmlPath="@cid"), @XmlJoinNode(xmlPath="con/text()", referencedXmlPath="name/text()") }) }) This will not be done in the 2.2.0 timeframe; setting the target milestone to 2.3.0
Created attachment 184405 [details] Proposed fix
Created attachment 184406 [details] Supporting tests
Created attachment 184489 [details] Proposed fix
Created attachment 184490 [details] Supporting tests
Created attachment 184620 [details] Proposed fix
Created attachment 184621 [details] Supporting tests
Created attachment 184622 [details] Supporting tests
Reviewed by: matt.macivor@oracle.com Tests: all unit tests pass as expected; jaxb/annotations/xmlelementsjoinnodes/collection/XmlElementsJoinNodeTestCases; jaxb/annotations/xmlelementsjoinnodes/XmlElementsJoinNodeTestCases; jaxb/externalizedmetadata/mappings/choice/ChoiceMappingTestCases Revision: 8632
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink