Community
Participate
Working Groups
The MOXy externalized metadata must allow multiple mappings to be created for the same property. This comes with the condition that at most one mapping is readable. The following metadata should produce two mappings for the currencyPairCode property: <xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/oxm http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_1.xsd" > <java-types> <java-type name="forum78.CustomQuoteRequest" xml-accessor-type="FIELD" xml-customizer="forum78.CustomQuoteRequestCustomizer"> <xml-root-element name="FIXML"/> <java-attributes> <xml-element java-attribute="requestId" xml-path="QuotReq/@ReqId"/> <xml-element java-attribute="currencyPairCode" xml-path="QuotReq/QuoteReq/Instrmt/@Sym"/> <xml-element java-attribute="currencyPairCode" xml-path="QuotReq/QuoteReq/Leg/Leg/@Sym" write-only="true"/> </java-attributes> </java-type> </java-types> </xml-bindings>
Created attachment 183793 [details] Proposed fix
Created attachment 183796 [details] Supporting tests
Created attachment 183859 [details] Proposed fix
Created attachment 183860 [details] Supporting tests
Reviewed by: matt.macivor@oracle.com Tests: all unit tests pass as expected; jaxb/externalizedmetadata/mappings/multiple/MultipleMappingPerFieldTestCases Revision: 8565
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink