This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Primary-Foreign Key relationship via hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Primary-Foreign Key relationship via hibernate" Watch "Primary-Foreign Key relationship via hibernate" New topic

Primary-Foreign Key relationship via hibernate

praveen sharma
Ranch Hand

Joined: May 27, 2006
Posts: 44
Hi Friends,
I am new in hibernate,
i don't have much of an idea about it.
I would appreciate if somebody send me 1 to many relationship code via email
stanislav bashkirtsev
Ranch Hand

Joined: Aug 17, 2009
Posts: 75
Use ;)
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

Here's a little tutorial I put together on the topic of mapping one to many associations.

Mapping One to Many Associations with Hibernate

The key tends to be the one to many mapping:

And the many to one mapping:

Don't get me started about those stupid light bulbs.
subject: Primary-Foreign Key relationship via hibernate
jQuery in Action, 3rd edition