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

Bug 354669

Summary: invalid map key class validation in orm.xml element collection
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JPAAssignee: Karen Butzke <karenfbutzke>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: 3.0Flags: neil.hauge: review+
Target Milestone: 3.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard: fix_ready
Attachments:
Description Flags
proposed patch against 3.0 maintenance none

Description Karen Butzke CLA 2011-08-12 15:43:43 EDT
Given a Collection attribute in java that is mapped as an element-collection in orm.xml a validation error is given incorrectly: "Map key class is not defined"
This also means that a Map ElementCollection would *not* have this validation error if the map key class is not defined.

private Collection<String> foo;

<element-collection name="foo">
</element-collection>

Workaround is to ignore this validation error in the JPA errors/warnings preferences.
Comment 1 Karen Butzke CLA 2011-08-12 16:02:45 EDT
Created attachment 201430 [details]
proposed patch against 3.0 maintenance
Comment 2 Karen Butzke CLA 2011-08-12 16:36:19 EDT
checked in to maintenance and HEAD
Comment 3 Jolene Moffitt CLA 2011-08-24 11:27:51 EDT
Verified in Build I-3.4.0-20110822071621 

Verified if you add a collection type attribute to the orm.xml mapping file the Map key error does not appear in the Problems pane as an error.  See the link to view test steps for verification.  http://wiki.eclipse.org/Dali_3.0.1