Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364201

Summary: [Entity Gen] CoreException: generating entities w/o specifying inverse join column for join table
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JPAAssignee: Nan Li <nan.n.li>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: neil.hauge
Version: unspecified   
Target Milestone: Future   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
stack trace none

Description Nan Li CLA 2011-11-18 16:35:17 EST
Build Identifier: I-3.4.0-20111117042436

1. Bring up the entity gen wizard, select a couple of tables and go to the
Table Associations page
2. Click New Association button to bring up the Create New Association page
3. Select 'Many to many association' radio button and specify Table 1 and Table2
4. Configure the join table *without* specifying inverse join column
5. Complete the rest steps and click Finish

The owning entity is not generated and an core exception is thrown complaining 

org.eclipse.core.runtime.CoreException: Unable to find JPA entities generation templates in pluginorg.eclipse.jpt.jpa.gen
	at org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateClass(PackageGenerator.java:245)

The full stack trace is attached.

We could enable the Finish button only when both join column and inverse join column are specified; however, based on the spec, both join columns and inverse join columns are optional. Defaults should apply if nothing is specified.

Reproducible: Always
Comment 1 Nan Li CLA 2011-11-18 16:36:51 EST
Created attachment 207251 [details]
stack trace
Comment 2 Nan Li CLA 2012-09-24 16:43:16 EDT
This problem happens when choosing a table which is not previously selected as the join table.