Community
Participate
Working Groups
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.
*** Bug 296664 has been marked as a duplicate of this bug. ***
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.
checked in to HEAD for inclusion in 2.3.1 maintenance
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.