Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328135 - Externalized metadata must allow for multiple mappings to be created for a single property.
Summary: Externalized metadata must allow for multiple mappings to be created for a si...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 332770 348118
  Show dependency tree
 
Reported: 2010-10-19 10:33 EDT by Blaise Doughan CLA
Modified: 2022-06-09 10:25 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (16.59 KB, patch)
2010-11-24 14:35 EST, David McCann CLA
no flags Details | Diff
Supporting tests (38.88 KB, patch)
2010-11-24 14:35 EST, David McCann CLA
no flags Details | Diff
Proposed fix (16.67 KB, patch)
2010-11-25 10:24 EST, David McCann CLA
no flags Details | Diff
Supporting tests (52.97 KB, patch)
2010-11-25 10:24 EST, David McCann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blaise Doughan CLA 2010-10-19 10:33:22 EDT
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>
Comment 1 David McCann CLA 2010-11-24 14:35:24 EST
Created attachment 183793 [details]
Proposed fix
Comment 2 David McCann CLA 2010-11-24 14:35:46 EST
Created attachment 183796 [details]
Supporting tests
Comment 3 David McCann CLA 2010-11-25 10:24:39 EST
Created attachment 183859 [details]
Proposed fix
Comment 4 David McCann CLA 2010-11-25 10:24:51 EST
Created attachment 183860 [details]
Supporting tests
Comment 5 David McCann CLA 2010-11-25 10:26:57 EST
Reviewed by:  matt.macivor@oracle.com
Tests:  all unit tests pass as expected; jaxb/externalizedmetadata/mappings/multiple/MultipleMappingPerFieldTestCases

Revision: 8565
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:25:32 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink