has_many many-to-many relationship?

edited February 2014 in Modules
In my artists_model I have added a has_many of itself as follows:

public $has_many = array('related_artists' => 'artists_model');

So I can, for example, add artist B as a related_artist to artist A.

But I now want artist A to automatically be a related_artist to artist B - how can I achieve this?

Thanks

Comments

  • edited 5:26PM
    What if you add a $belongs_to to your related_artists model?
  • edited 5:26PM
    I tried the $belongs_to but it has the same effect. If I make Artist A belong to artist B, artist B doesn't automatically belong to artist A.
  • edited 5:26PM
    Hmm... are you wanting something like how the users and permissions are setup in FUEL? Under users, you can select what permissions they have (has_many on the fuel_users_model), then under permissions, you can see what users have those permissions assigned to them (belongs_to on the fuel_permissions_model).
Sign In or Register to comment.