Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317318 - Canonical Metamodel - removing the @Generated annotation does not prevent Dali from generating the type
Summary: Canonical Metamodel - removing the @Generated annotation does not prevent Dal...
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.3.1   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 296664 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-18 12:33 EDT by Karen Butzke CLA
Modified: 2010-07-23 09:58 EDT (History)
3 users (show)

See Also:
neil.hauge: review+


Attachments
proposed patch against head (6.40 KB, patch)
2010-06-25 16:10 EDT, Karen Butzke CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2010-06-18 12:33:04 EDT
1. Create a JPA Project with an Entity Employee.
2. In the Java Persistence Properties select a Source folder for the Canonical metamodel.
3. Edit the Employee_ metamodel class by removing the @Generated annotation.
4. Return to the Employee class and change something.
The Employee_ metamodel class is regenerated.

If you removed the @Generated annotation, closed Eclipse and returned, we correctly do not regenerate the file.  If you then add @Generated(value="Dali") back to the file we still don't regenerate it. You have to delete it to get it regenerated.
Comment 1 Karen Butzke CLA 2010-06-18 16:45:20 EDT
*** Bug 296664 has been marked as a duplicate of this bug. ***
Comment 2 Karen Butzke CLA 2010-06-25 16:10:19 EDT
Created attachment 172807 [details]
proposed patch against head

This patch handles removal of the Generated and StaticMetamodel annotations. It also adds property change notification for these annotations.  Now if you add the @Generated(value="Dali", date="2010-06-25T15:40:04.968-0400") back to the generated file it will be immediately regenerated if changes have been made since the annotation was removed. Before you would have to make a significant change to the context model to get it to regenerate.
Comment 3 Karen Butzke CLA 2010-06-28 15:14:38 EDT
checked in to HEAD for inclusion in 2.3.1 maintenance
Comment 4 Jolene Moffitt CLA 2010-07-22 17:28:07 EDT
Verified this fix in Build wtp-R3.2.1-M: M-3.2.1-20100716070539  Tested manually by removing the @Generated annotation or @StaticMetamodel annotation.  Then closing eclipse, reopen and add the annotation back.  It is regenerated when I add either annotation back.