Use myeclipse to create model entity classes with annotations, and myeclipsemodel
1. create a JPA project first: Click Show All Wizards in the lower left corner. click "Next" twice and click "Finish". You do not need to perform any operations in the middle (after clicking "Next", you will see the Connection to the database, regardless of the database). For example, after clicking "FINISH", click "Finish. open the Myelipse Database Explorer view and right-click the DB Browser column to create a New connection: New... enter the information: Remember to import the package. Otherwise, an error will be reported. Click Test Driver: the connection is successful and the table of the corresponding database is displayed. Select the table that will generate the annotation model: Right-click> JPA Reverse Engineering... select the new JPA Project (this is why the JPA project is created, and it will be blank if there is no JPA project ), click "OK" and click "Next" to check all three items. Click "Finish". Information is always displayed in all steps. If yes, you can ignore the conversion view. The result is displayed: the model is successfully generated, you just need Copy and paste the model object class to your real project. Note 1: If the database table mapped by the model does not have a primary key, two tables will be generated as follows: if there is a primary key, there is no exception. Note 2: For multiple parties, myeclipse is managed by generating a Set. If not, it can be replaced with a List.