Community
Participate
Working Groups
Build Identifier: I20110525-0800 Go to Table Associations page, click New Association button to open Association Tables page, and click Browse button of Table 2 field to open Table Selection page, you'll see all the tables of the selected schema are listed which is incorrect. Only these tables that are selected on the first page, Select Tables, of the wizard should be listed. If not, choosing a table not selected on the first page will result in NPE like below when trying to add join columns for the association. java.lang.NullPointerException at org.eclipse.jpt.jpa.gen.internal.Association.getReferrerColumns(Association.java:194) at org.eclipse.jpt.jpa.ui.internal.wizards.gen.TableAssociationsWizardPage.updateForeignKeyColumnGenProperty(TableAssociationsWizardPage.java:550) at org.eclipse.jpt.jpa.ui.internal.wizards.gen.TableAssociationsWizardPage.launchNewAssociationsWizard(TableAssociationsWizardPage.java:530) at org.eclipse.jpt.jpa.ui.internal.wizards.gen.TableAssociationsWizardPage.access$0(TableAssociationsWizardPage.java:519) at org.eclipse.jpt.jpa.ui.internal.wizards.gen.TableAssociationsWizardPage$1.widgetSelected(TableAssociationsWizardPage.java:148) Reproducible: Always
Moving JPA specific bugs to new JPA component in bugzilla.
Created attachment 204312 [details] Proposed Patch This proposed patch fixes three problems: 1. The problem described in this bug 2. The problem described in bug 348286 3. The problem that Next button is still enabled after removing table name from the table field(s)
Is there a reason why you are adding the text modify listeners inside widgetSelected(...)? I'm thinking this would be bad.
(In reply to comment #3) > Is there a reason why you are adding the text modify listeners inside > widgetSelected(...)? I'm thinking this would be bad. I believe I added that to fix the 3rd problem described in comment #2. If you enter values to the fields and then remove them, the Next button will be still enabled which will leads to NPE later.
Created attachment 206039 [details] Proposed Patch
Patch released to head.
Verified in Build I-3.4.0-2011102024120 Verified when you select Table Selection for Table 2, only the selected tables appear in the dialog and no errors appear. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.1_M3