Forum OpenACS Q&A: Re: Using the new xotcl db layer

Collapse
Posted by Malte Sussdorff on
Wouldn´t it make sense to have get_class_from_db automatically initialize the superclasses if they don´t exist as this is probably what you want to do (most of the time) and provide it with a flag like "-no_superclasses" ?
Collapse
Posted by Gustaf Neumann on
It is certainly possible to implement a method, that creates all classes in sight (it is not a question of initializing), but still, it is necessary to a method to create a single class. For real world applications one might wish to keep these classes in the blueprint. Therefore it is necessary to keep control over deleting these classes after the connection thread or not. By working with the classes, one will recognize that the attributes tables of OpenACS are for many typs not complete. Therefore it is necessary to add the missing attributes manually (look for an example into 06-param-procs). So, get_class_from_db is just a helper method..

I don't understand what you mean by "no superclasses", since the superclasses are not optional.