Forum OpenACS Development: Re: relational segments: how do you use them

Collapse
Posted by Tom Jackson on

Once the uni_group is created and a membership_rel added of subtype parent_rel, I added this group via a composition_rel of subtype club_cyclist_rel to a group of type unicycle_club.

I then created a relational segment on the unicycle club group for rel_types of parent_rel. As I expected, the parent of the uni_group is now part of the relational segment for the unicycle club.


=# select * from party_approved_member_map where member_id = 823;
 party_id | member_id | tag
----------+-----------+------
     1185 |       823 | 1174
     1177 |       823 | 1174
     1169 |       823 | 1174
     1161 |       823 | 1174
       -1 |       823 |  824
      291 |       823 |  824
       -2 |       823 |  824
      823 |       823 |    0

The composition relationship has created the top two rows, 1177 due to the membership_rel now applying to the unicycle_club group, and 1185 due to the parent_rel now applying to the relational segment on the club group. So, adding one composition rel has resulted in the unicyclist being a member of the club, and their parent being a member of the parents rel segment for the club.