Skip to main content



      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 16:51 Go to next message
Eclipse UserFriend
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 587 times)

[Updated on: Thu, 14 August 2014 16:52] by Moderator

Re: Generate Entities from Tables - Skips One Table [message #1408349 is a reply to message #1408343] Thu, 14 August 2014 17:12 Go to previous messageGo to next message
Eclipse UserFriend
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] Thu, 14 August 2014 22:14 Go to previous message
Eclipse UserFriend
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: Sun Jul 27 14:09:29 EDT 2025

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

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

Back to the top