Let's now create the Course entity. Right-click on the project and select the JPA Tools | Generate Tables from Entities menu:
Make sure that CourseMgmtDBConnection is selected (refer to the Configuring JPA section of Chapter 7, Creating JEE Applications with EJB, for configuring a MySQL database connection in Eclipse) and that List generated classes in persistence.xml is selected. Click Next on this and the next page. On the Customize Defaults page, select identity as the Key generator and set the package name as packt.jee.course_management_jpa.entity: