This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate table mapping

 
Raj Ohadi
Ranch Hand
Posts: 316
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic