Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313941 - JAXB Externalized Metadata: Schema gen incorrect for self ('.') xml-path
Summary: JAXB Externalized Metadata: Schema gen incorrect for self ('.') xml-path
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: 308677
  Show dependency tree
 
Reported: 2010-05-21 12:41 EDT by David McCann CLA
Modified: 2022-06-09 10:19 EDT (History)
0 users

See Also:


Attachments
Contains fix + test case mods (10.92 KB, patch)
2010-05-21 12:50 EDT, 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 David McCann CLA 2010-05-21 12:41:18 EDT
The schema generator does not process the self ('.') xml-path correctly.  For example, if Employee had a self mapping to Department, where department had two string properties deptId and deptName, we would expect the following in the generated XSD file:

...
   <xsd:complexType name="employee">
      <xsd:sequence>
         <xsd:element name="deptId" type="xsd:string" minOccurs="0"/>
         <xsd:element name="deptName" type="xsd:string" minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
...

But instead we get:

...
   <xsd:complexType name="employee">
      <xsd:sequence>
         <xsd:element name="department" type="ns0:department" minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
...
Comment 1 David McCann CLA 2010-05-21 12:50:10 EDT
Created attachment 169525 [details]
Contains fix + test case mods
Comment 2 David McCann CLA 2010-05-21 13:56:37 EDT
Reviewed by matt.macivor@oracle.com
Unit tests pass as expected;  jaxb/externalizedmetadata/mappings/composite/CompositeMappingTestCase
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:19 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:19:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink