EclipseLink and JPA columns of table not showing u

2019-08-04 12:44发布

问题:

In Eclipse, I try to create entity classes based on an existing database schema. The wizard works until the end and creates the appropriate classes.

Except for one thing. Some classes are not being found by code as they're not generated.

In the "Customize individual entities" dialog, all the tables show up. Some of them don't have any columns being displayed in this dialog.

What works:

  • I can create relationships, even to these "missing" columns
  • I see these tables in Eclipses "Data Source Explorer"

The exact same columns don't appear in the JPA conversion dialog. The table has no arrow to further expand the item in the GUI.

I've already created a new workspace - without the success I'm looking for.

Why?

I'm using Microsoft SQL Server with the original sqljdbc4.jar

回答1:

Although I have no idea why it happens, I finally know how to fix it:

In the Data Source Explorer, just expand the nodes in the tree until you see all the tables and their respective columns.

Somehow, they don't get loaded in the wizard. But they seem to do when opened in the data source explorer.

Afterwards, they also show up in the wizard.



回答2:

Disconnecting and reconnecting using the Data Source Explorer fixed it for us.