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.

Bug 243986

Summary: Add refactoring support to JPA named queries
Product: javaee Reporter: terje7601
Component: PersistenceAssignee: Sergey Petrov <sj-nb>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description terje7601 2014-04-22 08:01:34 UTC
Suppose i have a JPA entity like:

@Entity
@NamedQuery(name="User.findAll", query="select u from User u")
public class User {

    // ...

}

Then I would like to be able to...

- do a Rename refactoring of the "name" attribute, and have all the uses of the named query updated

- do a Rename refactoring of the entity class, and have the "query" attribute of all named queries that use this entity updated

Ideally, there should also be a hint which checks that the "name" attribute of a named query starts with the name of the class on which it is defined, followed by a dot.