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
|