Installing and using Hibernate tools in Eclipse Indigo

In this post ill be showing installation of Hibernate tools in eclipse Indigo followed by use of Hibernate tools to do a simple hibernate One to Many example.

Step 1: Click on the help on the toolbar at the bottom of the drop down we will see eclipse marketplace. Click on the eclipse marketplace which opens a new window.

Step2: In the find option type the key words Hibernate tools for Indigo.

 Fig: Showing the eclipse market place

Step 3: Click on install button to install the Hibernate tools plugin to eclipse Indigo.

One To Many Example using Hibernate tools

Step 1: A java project name a 01usinghibernatetools right click on the project; At the bottom of the drop down select the properties option.

    
Step 2: Click on the hibernate settings option as shown above and click on the enable hibernate support check box. Click on apply followed by clicking Ok.

Step 3: Click on the window option on eclipse tool bar followed by show view followed by other. Here click on hibernate folder and then select hibernate configuration by clicking on it. Finally click OK.

Fig: Showing show view option

Step 4: Right click on the hibernate configuration window and select 

Fig: Showing the add configuration option in Hibernate configuration window.

Step 5: Clicking on the add configuration option opens edit configuration window. 

 Fig: Showing Edit configuration window

Step 6: Select the project by clicking on the project option.Click on setup configuration option then save the configuration.cfg.xml in the src folder of the project. click on next which opens the configuration window as below.

Step 7: fill in the details as follows: (here in this example i am using oracle 10g as my database)

Comments

Popular posts from this blog

SQL Tutorial with HSQLDB

Hibernate tutorial with HSQLDB

Java Interview Questions & Answers: user defined key class