File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 445

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
It's not a secret anymore!