Myelipse has been used in the past. It is quite easy to do hibernate reverse engineering in myeclipse.
However, I recently switched to eclipse and started to not install the Eclipse plug-in. After a few days, I finally installed the plug-in, but it won't be used for reverse engineering.
I finally found it on a foreign website:
Http://iablog.sybase.com/paulley/2009/02/reverse-engineering-sql-anywhere-with-hibernate-tools-part-trois/
I will introduce how to generate HBM. xml and classes:
Prerequisites
1. There is a project and hibernate 3.x has been added.
2. There is a corresponding database. It is not associated.
Then we officially started
1. Add hibernate. cfg. xml
Right-click the project --> New --> other ---> Search (hibernate) --> select "hibernate configuration file (CFG. XML) "--> next --> select the project name --> next --> Fill in the necessary information for connecting to the database --> finish
Figure:
2. Add the hibernate Configuration:
Click project --> New --> other ---> Search (hibernate) --> select "hibernate console configuration ". The following page is displayed:
3. Add hibernate. reveng. xml.
Right-click the project --> New --> other ---> Search (hibernate) --> select "hibernate reverse engineering file (reveng. XML)" --> next.
Such:
After completing the preceding steps, the system will create and open hibernate. reveng. XML, and then perform the following operations:
After adding the file, save and close the file.
4. Generate HBM. xml and bean.
In hinbernate mode.
In the specified directory, we can see the generated file.
The error is because no package location is specified. open the file and add it.
The main example is package com. Polaris. FW. Crud. Test.