| Summary: | JAXB Externalized Metadata: Need support for join-nodes on xml-elements (a.k.a. choice mappings) | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | David McCann <david.mccann> | ||||||||||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||||
| Severity: | normal | ||||||||||||||||||
| Priority: | P3 | ||||||||||||||||||
| Version: | unspecified | ||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Bug Depends on: | 323756 | ||||||||||||||||||
| Bug Blocks: | 332770 | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
David McCann
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 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |