FFL2:FFL2 Main/Hibernate Reverse Engineering: Difference between revisions

From FFL Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
== Create a Hibernate configuration in Eclipse ==
== Create a Hibernate configuration in Eclipse ==


Open the Hibernate perspective then right-click and choose 'Add Configuration...' in the Hibernate Configurations view as shown below
Open the Hibernate perspective then right-click and choose 'Add Configuration...' in the Hibernate Configurations view. Set up the 'Main' and 'Options' tabs as shown below
 
[[File:Eclipse Hibernate Config Main.png]]
 
[[File:Eclipse Hibernate Config Options.png]]
 




When creating the database connection under 'Main' using the 'New...' button, the JAR file for the driver to use needs to be specified by clicking the triangle next to the 'Drivers' drop-down
When creating the database connection under 'Main' using the 'New...' button, the JAR file for the driver to use needs to be specified by clicking the triangle next to the 'Drivers' drop-down
[[File:Eclipse Hibernate Driver Properties.png]]
[[File:Eclipse Hibernate Driver Definition.png]]


Finally, click 'Test Connection' to check it is ok.
Finally, click 'Test Connection' to check it is ok.

Revision as of 14:02, 7 January 2011

To reverse engineer the hibernate mappings and objects from the schema some additional setup is required.

Install Hibernate Tools Eclipse plugin

Create a Hibernate configuration in Eclipse

Open the Hibernate perspective then right-click and choose 'Add Configuration...' in the Hibernate Configurations view. Set up the 'Main' and 'Options' tabs as shown below


When creating the database connection under 'Main' using the 'New...' button, the JAR file for the driver to use needs to be specified by clicking the triangle next to the 'Drivers' drop-down

Finally, click 'Test Connection' to check it is ok.