| Summary: | Eclipselink java mapping overriden in orm.xml file does not work | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Karen Butzke <karenfbutzke> |
| Component: | JPA | Assignee: | Neil Hauge <neil.hauge> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | neil.hauge |
| Version: | 2.1 | ||
| Target Milestone: | 3.4 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | 392222 | ||
| Bug Blocks: | |||
I am unsure how to handle this case, but I don't see it being a simple change, targeting to future Moving JPA specific bugs to new JPA component in bugzilla. This issue came up in a recent meeting while discussing metadata conversion. It was decided that we should try to gently avoid the use of generic orm.xml in EclipseLink projects. This could be done by generating EclipseLink orm.xml files by default in project creation (when requested by the user) and guiding the user to create eclipselink orm.xml files in the UI when EclipseLink platform is in use. This won't "fix" this problem, but should help avoid this situation. Another thing we could do would be to place a warning on a mapping file any time when lower level metadata may not be supported, whether it is platform related or version related. This could be done in addition to the changes mentioned above. Another possibility would be to restrict a user from attempting to override metadata that it cannot override. Perhaps you would still see a virtual mapping, but the context menu and details actions would be disabled. Targeting to Juno release. Given that bug 392222 has been fixed, this bug is possibly lower in severity. It would be nice to do more, but moving that effort to 3.4 at this point. Not likely that we will do more here. |
Create a JPA project with the EclipseLink platform chosen, leave the create orm.xml file checkbox checked. You will the eclipselink java on your build path. Create a java class and add an attribute with the org.eclipse.persistence.annotations.BasicCollection annotation: @Entity public class Foo { @BasicCollection private Collection<String> bars; } In the orm.xml file, view the JPA structure and select the bars attribute. An exception is thrown in the error log: java.lang.IllegalArgumentException: Unsupported attribute mapping UI provider key: at org.eclipse.jpt.ui.internal.details.PersistentAttributeDetailsPage.getAttributeMappingUiProvider(PersistentAttributeDetailsPage.java:77) This same problem could occur when we support the JPA 2.0 spec and allow a JPA 1.0 orm.xml file with the 2.0 faceted project.