Forum OpenACS Development: What is the function of the "type_extension_table" attribute of an object_type?

Object types have a "type_extension_table" attribute in addition to the commonly used "table_name" attribute which lists the table that stores the attributes for each of the objects of that type. I only see one place in the entire toolkit that uses this in acs-subsite/sql/[oracle/postgresql]/application-groups-create.sql. It is set to 'group_types' which really doesn't make any sense to me.

I don't see any comments or code to suggest why it is set this way.

Every other object type I could see sets this to null. It appears to be an undiscovered, little documented feature.

I've seen that too, I assumed that the code worked like the CMS/CR code to auto create the main acs_object table for the object data. Supposedly, you just create the object type, in pl code, then do the same for each attribute, and never have to write code for the table itself.

Of course it would have been much easier to just create the table with all the nicely named constraints, check, reference, etc., and then to run a function that would dig the info out of the database and stuff the acs_attributes data model.

This is what I am now doing with my query-writer package, in the end a single call (tcl or pl, not sure yet) will grab the attribute info from the base table all the way back to acs_objects.

Check out my dm browser

Tom,

I think "table_name" does what you are referring to. On rereading the doc, I think this is the intention:

Table_name refers to a table which has one row for each object of an object_type. Type_extension_table would contain rows for some of the objects, but not necessarily all, I guess some sort of optional attributes.

I will look into how the built in object tcl API, such as package_instantiate_object, handles it.