Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364201 - [Entity Gen] CoreException: generating entities w/o specifying inverse join column for join table
Summary: [Entity Gen] CoreException: generating entities w/o specifying inverse join c...
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: Nan Li CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-18 16:35 EST by Nan Li CLA
Modified: 2013-05-07 12:08 EDT (History)
1 user (show)

See Also:


Attachments
stack trace (4.50 KB, text/plain)
2011-11-18 16:36 EST, Nan Li CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.