This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 111683 [details] Testcase in zip file Version 7.1 beta To reproduce, please use the attached project, or follow these steps: How to reproduce: - Menu|File|New Project|JavaEE|EJB Module|Next|Finish - Projects Window|Project|Source Packages|New|Java Package|entity - Projects Window|Project|Source Packages|New|Java Package|entity|New|Entity Class|MyEntity|Next|Data Source: jdbc/sample|Finish - In MyEntity.java. add: public static final String GET_BY_NAME = "MyEntity.getByMemberId"; public static final String DELETE_BY_ID = "TripOfferShortlist.deleteById"; public static final String INSERT_NATIVE = "MyEntity.insert"; private String name; and generate getter/setter - In MyEntity.java, below @Entity, add: @NamedQueries(value = { @NamedQuery(name = MyEntity.GET_BY_NAME, query = "select s.id from MyEntity s where s.name= :name") , @NamedQuery(name = MyEntity.DELETE_BY_ID, query = "delete from MyEntity s where s.id= :id= :id") })// @NamedQueries end @NamedNativeQuery(name = MyEntity.INSERT_NATIVE, query = "insert into MyEntity(name)values(?)") - Projects Window|Project|Source Packages|entity|MyEntity|Copy - Projects Window|Project|Source Packages|entity|Refactor Copy|MyEntity1 The copied class contains two instances of @NamedNativeQuery(name = MyEntity1.INSERT_NATIVE
*** Bug 203341 has been marked as a duplicate of this bug. ***
Looks like source generator issue.
Could this please get higher priority?
Lets see if this is enough: http://hg.netbeans.org/jet-main/rev/e57ec0a1062a
Integrated into 'main-golden', will be available in build *201210260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e57ec0a1062a User: Jan Lahoda <jlahoda@netbeans.org> Log: #203333: improving diffing of annotations.