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.
Since the entries are being added automatically we should also rename/delete entries in PU when the class gets renamed/deleted (as a refactoring).
This is actually implemented, and it works for me. I tested following: 1. Created a PU and an entity 2. Added that entity to a PU (if neede, as you wrote, in Java application they are added automatically) 3. Performed rename / safely delete Seemed to work for EJB module, Web module and Java application. Could please provide steps to reproduce?
You are right, it works. I was just confused - rename refactoring is started even if you rename the object using inplace editor, but for delete you have to be careful to use Safe Delete, not the Dangerous Delete. I do not know why this is so, but I understand this is not a problem of persistence.xml. Sorry.
The purpose of Safe Delete is to check before deleting a class whether there are references for this class. It was not supposed to correct any references. It just informs the user that there are references and the user can decide whether to delete it anyway. I think the entity class and PU is a bit different case. We're trying to automatically update PU when a new class is created, so we should update PU even if a class is deleted. I don't mean the safe delete. I mean just the regular delete. I expect there might be some problems with automatic update, but I'm reopening while we're discussing this issue.
I filed issue #76722 for safe delete not being integrated with regular delete. But I think it's still a different issue than this one.
Will be fixed when issue 76722 is fixed, which very likely won't happen in 5.5 timeframe => TM Dev.
Fixed now since issue 76722 has been fixed.