Creating a JPA entity

We will now create the entity class for Course, using Eclipse JPA tools:

  1. Right-click on the CourseManagementEJBs project and select JPA Tool | Generate Entities from Tables:
Figure 7.18: Creating entity from tables
  1. Select the Course table and click Next. Click Next in the Table Associations window. On the next page, select identity as Key generator:
Figure 7.19: Customizing JPA entity details
  1. Enter the package name. We do not want to change anything on the next page, so click Finish. Notice that the wizard creates ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.