Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349216

Summary: [EclipseLink] element collection not supported in 1.2 eclipselink orm.xml file
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P4 CC: neil.hauge
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
stack trace none

Description Karen Butzke CLA 2011-06-13 13:29:13 EDT
Created attachment 197907 [details]
stack trace

1. Create an Eclipselink JPA project.
2. Choose New -> XML File
3. Select 'Create an XML file from an XML schema'
4. Select 'Select XML catalog entry' and choose eclipselink_orm_1_2.xsd
5. on the next page select 'Create optional attributes' and 'Create optional elements' and change optional element depth to 6
6. Edit the namespace info and remove the 'orm' prefix
7. finish the wizard and add attempt to add the created xml file to the persistence.xml list of mapping files. The attached ClassCastException occurs


Caused by: java.lang.ClassCastException: org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlElementCollection cannot be cast to org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping
	at org.eclipse.jpt.jpa.core.context.orm.UnsupportedOrmAttributeMappingDefinition.buildContextMapping(UnsupportedOrmAttributeMappingDefinition.java:60)
Comment 1 Neil Hauge CLA 2011-06-14 16:02:20 EDT
Since element collection was a preview feature in 1.2, we likely did not intend to support this in our 1.2 support in Dali.
Comment 2 Neil Hauge CLA 2011-07-01 16:24:23 EDT
Moving JPA specific bugs to new JPA component in bugzilla.