-->
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: many to many - same attribute
PostPosted: Sun Jul 25, 2004 9:17 am 
Newbie

Joined: Sun Jul 25, 2004 9:07 am
Posts: 3
Hello all,

I am trying to model a relationship between a class called Organisation.

Each organisation has 'affliates' but it is not possible for organisation A to be an affiliate of organisation B without the reverse being true.

I am trying to write the mapping file for a method on Organisation with the signature 'public Set getAffliates()', however, this method forms both sides of a bi-directional relationship. I want to set this up so that if i add Organisation B to Organisation A's affliate set and then call getAffliates on Organisation B I should see Organisation A in the list.

Is it possible to set up a single method in a single class to represent both sides of the many-to-many? If so, could someone point me in the direction of how this can be accomplished?

Thanks in advance.

Wesley Hall


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.