This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes hibernate table mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate table mapping" Watch "hibernate table mapping" New topic
Author

hibernate table mapping

Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
Have started learning Hibernate.

1. for the following table

Student (
name PK
DOB PK
address varchar
age NUMBER
)

I use natural key, a compunding key (name and DOB). How do I specify that in my hibernate mapping file ?

2. If Table A has foreign keys referring to Table B and Table C, but I am only going to insert rows into Table A. Do I still have to specify the foreign key realtion with table B/C in my hibernate mapping file ? i.e. do I have to "mention" or "include" Table B/C information in the mapping file ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate table mapping