This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Subhendu Mahanta

+ Follow
since Jan 28, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Subhendu Mahanta

It is also available in Hibernate reference section 1.1.6. Startup and helpers.
Because reference is also written by same people: Christian Bauer & Gavin King.
Here is your HibernateUtil class:

I wanted to mean "Thanks Ran".Sorry for the typo.
Thanks Ron.
You are correct that this is part of a learning experience.There is no need for address to point back to customer.Let's say there are 2 entities A & B which have a bi-directional association. In that case I think shared primary key will be the preferred technique.
I have 2 entities :Customer & Address.

With @OneToOne and @JoinTable looks like this:


When I try to persist a customer I get the following stack-trace:

I have tried this change in Address entity:

with no effect. Surely this could be done without using JoinTable.But I want to do it this way for academic interest.Is it possibe?