In the Parties in OpenACS 4.6.3 page under the section
"Group Relations" (about 1/2 way through the page), it says the following:
But just because you are a member of an organization that is a member of Greenpeace, that doesn't make you a member of Greenpeace, i.e., membership is not transitive with respect to itself. Now let's consider a multinational corporation. This corporation might have a U.S. division and a European division. A member of either the U.S. or European division is automatically a member of the company. In this situation the U.S. and European divisions are "components" of the company, i.e., membership is transitive with respect to composition.
I tried to replicate this example stucture with the following PL/SQL code:
-- -*- mode: sql; tab-width: 4; -*- EMACS display variables
declare
gid0 integer;
gid integer;
pid integer;
cid integer;
mid integer;
begin
gid0 := acs_group.new(group_name => 'Sony');
pid := person.new( email => 'joe@not-really-sony.com',
first_names => 'Joe',
last_name => 'Smith');
mid := membership_rel.new(object_id_one => gid0, object_id_two => pid);
pid := person.new( email => 'jane@not-really-sony.com',
first_names => 'Jane',
last_name => 'Smith');
mid := membership_rel.new(object_id_one => gid0, object_id_two => pid);
gid := acs_group.new(group_name => 'Greenpeace');
cid := composition_rel.new(object_id_one => gid, object_id_two => gid0);
gid := acs_group.new(group_name => 'The Sierra Club');
mid := membership_rel.new(object_id_one => gid, object_id_two => gid0);
end;
/
show errors
As a result,
Joe
and
Jane
, both members of
Sony
, became members of
Greenpeace
. My attempt at creating the
membership_rel
between
The Sierra Club
and
Sony
failed due to a type error. I investigated the acs-kernel datamodel and indeed the types required for each _rel are as follows:
composition_rel
relates group
to group
membership_rel
relates group
to person
Am I wrong in thinking this doesn't correspond to the description given in the documentation? Shouldn't the membership_rel relate a
group
to a
party
at which point the non-transitivity of membership would be evident?
If the situation described in the documentation is not meant to be implemented in this way, what's the point of having separate compisition_rel
s and membership_rel
s when a single membership_rel
could relate group
s to party
s?