-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: newbie: How to define 1 to * relationship with intermediate
PostPosted: Fri May 21, 2010 5:48 pm 
Newbie

Joined: Fri May 21, 2010 5:42 pm
Posts: 2
I have three tables Person, Organization and Address. The relationship between Person and Address is 1 to many, as is the relationship between Organization and Address. I have an intermediate Party table with Party ID that manages the relationship

Person
- PersonID
- Name
-PartyID (references Party.ID)

Organization
-OrgID
-Name
-PartyID (references Party.ID)

Address
-AddrID
-PartyID (references Party.ID)
-Street

Party.
-PartyID

My Person object and Organization object have a collection of Address. How do I define this relationship in the hibernate cfg file.

TIA


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.