Forum OpenACS Development: What is acs_rel?

Collapse
Posted by Gilbert Wong on
What is acs_rel?  I saw it in Dan's documentation "Using the Content
Repository with Postgresql".  It was used in the oracle code, but it
wasn't used in the Postgresql code.  I searched through the OpenACS 4
code and it looks like acs_rel sits in the acs-relationships-
create.sql file.  Thanks.
Collapse
Posted by Dan Wickstrom on
acs_rels is a generalized mapping table.  It's similar to the mapping tables like user_group_map that we had in openacs 3.2.5, but it's generalized so that it can be used to describe any mapping relationship.  It forms the basis of the composition and membership relations that are at the core of the new parties/groups system in openacs 4.x.

It is used in both the oracle and postgresql versions of the portrait upload, but since its use doesn't change when using postgresql, I just glossed over its usage in the content-repository document.  If you study acs-subsite/www/user/portrait upload-2.tcl, you will see that a relation is created between the user and the image, so that it is possible to later retrieve a user's portrait if you know their user_id.

Collapse
Posted by Gilbert Wong on
Thanks Dan.  I'll check out the code.
Collapse
Posted by Gilbert Wong on
Dan,

Is there any documentation on how to use the sql package acs-rel-type?  Thanks.

Collapse
Posted by Dan Wickstrom on
I'm not aware of any specific documentation for acs_rels.  The only thing I could suggest is to search the source code for acs_rels to get an idea of how it should be used.