Forum OpenACS Development: Re: should the supertype of 'acs_object' be 'acs_object' ?

Collapse
Posted by Jeff Davis on
I think the reason the root supertype was not NULL was because oracle does not index nulls. The acs_object_types table is so small that it does not matter one way or the other though.

Russell, is there any reason you can't just use the code as is using supertype = type where you want to create a new object type root?

Collapse
Posted by russ m on
Jeff - I'm not wanting to create a new root to the object hierarchy, I'm just climbing from a specified object_type to the root to see what attributes the type and it's parents have. I can easily enough special-case 'acs_object' and stop climbing then (that is in fact what I'm doing now), but it seemed to me that the current situation was not semantically correct and was probably just an unforseen side-effect of making acs_object_type__create_type more "friendly".
Collapse
Posted by Jeff Davis on
Oh, I see.

Actually I was talking out my ass anyway, the reason it's not null is the pg port is borken with respect to the oracle version. On oracle the supertype param is defaulted to 'acs_object' but when acs_object is added as an object type the param is set explicitly to null.

On pg, you don't have parameter defaulting so it can't distinguish a supertype you want to have be null from one where you just want the default.

I think we should special case the acs_object object_type create to leave it null in pg as well.