Have you downloaded the Hibernate core module and the required dependencies?
Is this a web based application or a stand alone app?
I have a few free tutorials on my website that you might want to look at. First, get things set up on your computer. Second, verify your installation. Third, figure out how to do very simple CRUD operations with one table. And then, move into mapping associations. If you jump in head first with a shallow knowledge of Hibernate, you'll be in trouble.
Good luck! Let us know how you do. And if you run into any problems, let us know and we'll try our best to help you out.
Joined: Jul 04, 2008
Thanks for taking the time to reply. I have set up the Hibernate environment in Eclipse. I have the databse drivers and have been successfully able to persist a single POJO in the database.
Where I am getting lost is the mapping part. I have not been able to find a link which gives me a clear lucid example.
I was also planning to get a copy of your book. Only thing the description of your book said that the book has not used the xml mapping files, since it is outdated. However a lot of projects out there would most probably be still using the xml mapping files and I thought that understanding that thoroughly is important to clear one of the hibernate interviews to get into a project.
Can you refer me to a suitable example, link, book Thanks again for all help
The difference between uni and bi is based on the Java Objects. Do both Java objects have references to each other. So two classes Parent and Child, does Parent have a Collection of Child objects, and at the same time the Child has a reference to its Parent object. If so, then it is bi-directional. If just one side has a reference then it is uni-directional.
Since it's bi-directional, you will have accessor methods in both classes. The key refers to the association of primary key from one table to another.
The best option for you would be to take up a book like Hibernate In Action, which tends to be a little more descriptive than the default documentation (and also contains some diagrams to help explain the concepts).