| Summary: | [EclipseLink] enumerated element is automatically added for id mapping | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Nan Li <nan.n.li> | ||||||
| Component: | General | Assignee: | Nan Li <nan.n.li> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | jolene.moffitt, karenfbutzke, neil.hauge | ||||||
| Version: | unspecified | Flags: | karenfbutzke:
review+
|
||||||
| Target Milestone: | 3.0 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Nan Li
Created attachment 188098 [details]
Patch
Looks good. Enumerated didn't belong there, as you mentioned. Patch committed to head. I should have looked at this sooner. enumerated is supported on id mappings, but only in the eclipselink 2.2 orm schema. The resource model is written in such a way that the translators are for the latest version of the schema, shouldn't hurt to have extra translators for things that won't ever appear in the file. The real solution here is in o.e.jpt.core.resource.orm.XmlId the static file ENUMERATED_EDEFAULT needs to be changed to the following. We have to change what EMF has generated and make sure it doesn't regenerate over it by removing the @generated javadoc. You can see the same thing being done in o.e.jpt.core.resource.orm.XmlBasic /** * changed this to null and removed the generated flag so emf won't generate over * it we don't want a default for enums, just null if the tag does not exist */ protected static final EnumType ENUMERATED_EDEFAULT = null; Created attachment 188281 [details]
Patch
Integrated the comment and tested
I have checked this patch in for 3.0M6 Verified in Build I-3.3.0-20110414085808 Verified when you add an ID mapped attribute to eclipselink-orm mapping file the <enumerated> tag does not appear in the Source. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0_M6 |