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

Bug 339560

Summary: Invalid package does not trigger validation of mapped classes
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: GeneralAssignee: Karen Butzke <karenfbutzke>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: karenfbutzke, neil.hauge
Version: unspecifiedFlags: neil.hauge: review+
Target Milestone: 3.0.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
proposed patch against head none

Description Nan Li CLA 2011-03-10 12:38:10 EST
Build Identifier: I-3.3.0-20110305235707

Giving the right setting first in the mapping file like below

<package>test.oracle.models</package>
<entity class="employee.Employee"></entity>

Then changing the package to an invalid one like below either by directly editing the mapping file source or thorugh the package chooser. Validation of the mapped class should be given against the invalid package, at least saying the mapped class cannot be resolved.

<package>BLAHBLAH</package>
<entity class="employee.Employee"></entity>

But if giving an invalid class name like below, some validation will show up. 

<package>BLAHBLAH</package>
<entity class="employee.EmployeeAAA"></entity>

Changing the class name back to the right one like below, the validaiton will remain with the invalid package name, which is what we expect.

<package>BLAHBLAH</package>
<entity class="employee.Employee"></entity>

Reproducible: Always
Comment 1 Karen Butzke CLA 2011-06-07 17:51:11 EDT
Created attachment 197548 [details]
proposed patch against head
Comment 2 Karen Butzke CLA 2011-06-24 07:57:26 EDT
checked in to HEAD for 3.0.1