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.
The package attribute of the hibernate-mapping element is not considered when refactoring a class. For instance, if my mapping file has the following... <hibernate-mapping> <class name="my.package.pojo.User" table="users"> <!-- SNIP --> </class> </hibernate-mapping> ...and I refactor the User class to rename or move it, the mapping file is updated to match. However, if my mapping file has the following... <hibernate-mapping package="my.package.pojo"> <class name="User" table="users"> <!-- SNIP --> </class> </hibernate-mapping> ...and I perform the same refactoring as before on the User class, the mapping file isn't touched by the refactor process.
package attribute need to be considered in Hyperlinking Java classes in mapping files.
*** Issue 153969 has been marked as a duplicate of this issue. ***
after 8b098fa5a4f2 and 60a73e76253e this seems to function ok, please reopen with steps if encountered again
Still not working. The steps to reproduce are what you would expect (see the original description): 1. Create an entity bean class in a package. 2. Create a corresponding mapping file. 3. In the <hibernate-mapping> element, declare a "package" attribute with a value matching the class's package. 4. Instead of using the FQCN of the class in the "name" attribute of the <class> element, use just the simple class name. 5. Refactor (rename) the entity bean class. When previewing the refactor, the mapping file does not shows up in the list of files to be modified. Mapping files which reference the class by its FQCN do show up in the preview and are refactored correctly, but that happened already. Also, Ctrl+clicking the class's name in the mapping file (e.g. User in <class name="User" table="users">) does not open the class. Instead, the message "Source file User not found" appears in the status bar. Really, it should be looking for my.package.pojo.User, using the value of the "package" attribute defined in the <hibernate-mapping> element.
Somehow, I doubt this is going to make it into 6.8.
still valid, seems easy to fix but with a lot of changes.
it's kind of issue 4 in 1 or more, hiperlink is fixed, usages is fixed, rename is fixed, need to check 'move' http://hg.netbeans.org/web-main/rev/51508004e837 http://hg.netbeans.org/web-main/rev/747b6900a1d6 http://hg.netbeans.org/web-main/rev/fefd47370685
http://hg.netbeans.org/web-main/rev/60dd1c823c0d if any more issues will be found in the area, please file as separate issues to avoid all in one issue.
Integrated into 'main-golden', will be available in build *201205220903* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/51508004e837 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #153968 hiperlink for class name