Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Generate Entities from Tables - Skips One Table
Generate Entities from Tables - Skips One Table [message #1408343] Thu, 14 August 2014 20:51 Go to next message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
I am using Eclipse Juno EE. I have a small MySQL database with 5 tables running locally. See file for ERD.

I have set up a database connection to the database and can view all the tables/columns fine.

When I run the JPA tools wizard to create to create entities from the tables the itemlog table is listed, but it's relationship to item is missing. I can add that in manually, but when I hit get to the "Customize Individual Entitie" step, if I try to expand the itemlog table, there's nothing. I can expand all the others, including batchlog and see their columns. If I hit finish, all the other tables have entities generated for them but not itemlog.

I have tried restarting Eclipe and still no go.

Any clues as to why the JPA tools wizard has trouble reading this table when the Data Source Explorer sees it just fine?
  • Attachment: ERD.jpg
    (Size: 56.02KB, Downloaded 290 times)

[Updated on: Thu, 14 August 2014 20:52]

Report message to a moderator

Re: Generate Entities from Tables - Skips One Table [message #1408349 is a reply to message #1408343] Thu, 14 August 2014 21:12 Go to previous messageGo to next message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
Found an error in the log and figured out that it was referring to a missing column in itemlog (categoryid) and the foreign key was failing.

java.lang.IllegalStateException: itemlog.itemlogFK - mismatched sizes: 1 vs. 2
at org.eclipse.jpt.jpa.db.internal.DTPForeignKeyWrapper.buildColumnPairArray(DTPForeignKeyWrapper.java:130)
at org.eclipse.jpt.jpa.db.internal.DTPForeignKeyWrapper.getColumnPairArray(DTPForeignKeyWrapper.java:120)
at org.eclipse.jpt.jpa.db.internal.DTPForeignKeyWrapper.getLocalColumnPairs(DTPForeignKeyWrapper.java:115)
at org.eclipse.jpt.jpa.db.internal.DTPForeignKeyWrapper.getBaseColumns(DTPForeignKeyWrapper.java:160)
at org.eclipse.jpt.jpa.db.internal.DTPForeignKeyWrapper.baseColumnsContains(DTPForeignKeyWrapper.java:169)
at org.eclipse.jpt.jpa.db.internal.DTPTableWrapper.foreignKeyBaseColumnsContains(DTPTableWrapper.java:222)
at org.eclipse.jpt.jpa.db.internal.DTPColumnWrapper.isPartOfForeignKey(DTPColumnWrapper.java:73)
at org.eclipse.jpt.jpa.gen.internal.ORMGenColumn.isForeignKey(ORMGenColumn.java:266)
at org.eclipse.jpt.jpa.ui.internal.wizards.gen.TablesAndColumnsCustomizationWizardPage$TableColumnTreeContentProvider.getChildren(TablesAndColumnsCustomizationWizardPage.java:322)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1374)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:620)

Re: Generate Entities from Tables - Skips One Table [message #1408416 is a reply to message #1408349] Fri, 15 August 2014 02:14 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
This is Dali bug 419806[1]; which is blocked by DTP bug 420027[2].
There is an explanation of the problem there; but no forthcoming resolution....

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=419806
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=420027
Previous Topic:JPA Generate Entities From Tables Fails
Next Topic:JPA Diagram Editor 1.1.1 and Eclipse Luna 4.4.1
Goto Forum:
  


Current Time: Sat Sep 22 02:56:08 GMT 2018

Powered by FUDForum. Page generated in 0.01977 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top