Forum OpenACS Q&A: Object Model & acs_attributes

Collapse
Posted by James Thornton on
I haven't been using the object system lately for custom apps, but I am considering it for a project. If you create a new object type in acs_object_types, must you create entries in acs_attributes? If not, what do you lose by not using acs_attributes?
Collapse
Posted by Don Baccus on
Currently the object metadata is not used by much of anything useful but we're talking actively about merging in the capabilities of the CR/CMS (automatic form generation from object attributes, for instance) into base acs_objects, along with high-level declarative TCL API for generating objects and attributes without having to write so much RDBMS-specific SQL.
Collapse
Posted by James Thornton on
Thanks Don. Also, why does the acs_object_types package_name column have a unique constraint? Why can't you have more than one object_type per package?
Collapse
Posted by Malte Sussdorff on
Hi Don, which version of CR/CMS are you talking about (so I can have a look and steal in advance....). After all one challange of the assessment system is to create a form out of cr_items with special attributes that define how the entry widget is displayed.
Collapse
Posted by Tom Ayles on
Hi James,

I believe the package_name column in acs_object_types refers to the PL/SQL package name rather than the APM package name. I think it might be used to optionally drop the PL/SQL for an object type when you delete the type, and so you'd want it to be constrained unique to prevent automatically dropping the PL/SQL for another type that isn't being deleted.

HTH,
Tom

Collapse
Posted by James Thornton on
Ahh, thanks Tom. I couldn't find that documented -- was the package_name column recently added?