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.
E-mail from Ian Evans: For example, I generated several entities from a database schema, and was cleaning up the entity field names by using the refactoring engine. For a many-to-many relationship of customers and accounts, the Customer entity misnamed the accounts field (it used accountId, from the column in the database), and Account had a similar problem with customerId for customers. I renamed these fields to accounts and customers, respectively, but the relationship annotations weren't updated: In Customer.java: @ManyToMany(mappedBy = "customerId") private Collection<Account> accounts; In Account.java: @JoinTable(name = "BANK_CUSTOMER_ACCOUNT_XREF") @ManyToMany private Collection<Customer> customers; The refactoring engine needs to update annotation elements. In my case, it should have updated the entities to the following. In Customer.java: @ManyToMany(mappedBy = "customers") private Collection<Account> accounts; In Account.java: @JoinTable(name = "BANK_CUSTOMER_ACCOUNT_XREF") @ManyToMany private Collection<Customer> customers;
+1 on this; refactorinf is the only reasonable way to change the names (as they can not be changed in the DB2Java wizard) so this is important. IMO can be fixed after feature freeze.
*** This issue has been marked as a duplicate of 73934 ***