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

Bug 364996

Summary: switching from Entity to MappedSuperclass java named queries are deleted
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JPAAssignee: Nan Li <nan.n.li>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: 3.1Flags: neil.hauge: review+
Target Milestone: 3.2 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch
neil.hauge: iplog+
additional patch neil.hauge: iplog+

Description Karen Butzke CLA 2011-11-28 13:26:31 EST
In bug 335596 support was added for Named Queries on mapped superclasses. When you change the type from Entity to MappedSuperclass using the JPA Details or JPA Outline view the NamedQuery and NamedNativeQuery annotations are lost. There are some junit tests that need to be updated to reflect this as well
Comment 1 Nan Li CLA 2011-11-29 16:41:49 EST
Created attachment 207693 [details]
proposed patch
Comment 2 Neil Hauge CLA 2011-11-29 17:53:28 EST
Patch committed to head.
Comment 3 Karen Butzke CLA 2011-11-30 08:15:28 EST
There is a test failure in the build as a result, it's an incorrect test since it assumes the query is removed when switching from entity to mapped superclass
Comment 4 Nan Li CLA 2011-11-30 11:05:16 EST
Created attachment 207738 [details]
additional patch

updated test
Comment 5 Neil Hauge CLA 2011-11-30 11:24:58 EST
Patch committed to head.
Comment 6 Jolene Moffitt CLA 2011-12-14 11:21:28 EST
Verified in Build I-3.4.0-2011122233548 

Verified when you add Named Query or Native Named Query in an Entity and change to Mapped Superclass the Query details remain.  See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.2_M4