This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes How to configure a foreign key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to configure a foreign key" Watch "How to configure a foreign key" New topic

How to configure a foreign key

Anand Raj

Joined: Feb 24, 2007
Posts: 5
Hi friends,

I'm new to Hibernate, I want to know how to configure xml file for reference key/foreign key.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

"geneous infinite"

Please check your private messages.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 444

Hi geneous,

You have to use the mapping elements (one-to-one, one-to-many etc) in the hbm.xml configuration file. For more details check the Hibernate site,

I agree. Here's the link:
subject: How to configure a foreign key