aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to configure a foreign key" Watch "How to configure a foreign key" New topic
Author

How to configure a foreign key

Anand Raj
Greenhorn

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
Bartender

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: 443
    
    1

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, hibernate.org.

Cheers,
Raj.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to configure a foreign key