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 Primary-Foreign Key relationship via hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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:

I agree. Here's the link:
subject: Primary-Foreign Key relationship via hibernate
It's not a secret anymore!