Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364996 - switching from Entity to MappedSuperclass java named queries are deleted
Summary: switching from Entity to MappedSuperclass java named queries are deleted
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Nan Li CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-28 13:26 EST by Karen Butzke CLA
Modified: 2012-05-24 16:18 EDT (History)
2 users (show)

See Also:
neil.hauge: review+


Attachments
proposed patch (1.53 KB, patch)
2011-11-29 16:41 EST, Nan Li CLA
neil.hauge: iplog+
Details | Diff
additional patch (1.64 KB, patch)
2011-11-30 11:05 EST, Nan Li CLA
neil.hauge: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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