New Entity Classes from Database Wizard: Database Tables

See Also

This wizard generates a set of entity classes based on tables from an existing database connection or schema. In this wizard you choose the data source or connection to your database and the tables in that database with the fields that you want to persist. The IDE then generates an entity class for each of these tables and any related tables with persistent fields.

You open the wizard by right-clicking a project node or subnode and choosing New Other, selecting the Persistence category and then selecting Entity Classes from Database.

Use this page of the wizard as follows:

  1. Select one of the following:
  2. Select any tables in the left panel and click the Add button. If the table references other tables, the referenced tables are automatically added to the Selected Tables list in the right pane. The referenced tables are greyed out to indicate that they are referenced tables. You can place your cursor over the referenced tables to see a tooltip indicating which table references the table. The IDE automatically generates entity classes for each of the tables listed in the right pane.
  3. Click Next to confirm the entity class names and specify where to save the entity classes.
See Also
About Java Persistence
Generating Persistent Entity Classes from a Database
Connecting to a Database
Obtaining a Database Schema
About Connection Pools

Legal Notices