Brief introduction
MyEclipse comes with a lot of very useful tools, this time will introduce the use of Hibernate tools.
1. First open the Hibernate view of MyEclipse
2. Then in the upper left corner of the DB browser view, right-click, create a new database connection driver, such as: is an example of a MySQL database connection
3. Add myeclipse hibernate compatibility for a Java Web project
4. Follow the steps below to step down
(1) (2) (3) (4)
5. Use the MyEclipse Hibernate reverse tool to automatically generate Hibernate entity classes and. hbm.xml files based on tables.
Open the Hibernate view for MyEclipse again, select the database connection driver that you established earlier, and then expand to locate the table. And then we need the reverse.
Right-click the database table.
Then choose the appropriate option. Generation can
Note: This approach generally applies to the following scenarios: first design the data table, and then write the background program. In this case, we don't need
The Java file of the manual realist class and its XML mapping file are automatically generated directly by the tool.
Use of reverse engineering for MyEclipse hibernate