Forum OpenACS Q&A: content_revision vs content_template

Is this correct?

Types 'content_template' and 'content_folder' are subtypes of 'content_item'.

But templates have a object_type of 'content_item' whereas folders have an object_type of 'content_folder'

Is it because templates have no item-specific data and all its important stuff is in the cr_revisions table while folders have no data in the cr_revisions table and all its data is in the cr_folders table?

Whenever you subclass 'content_revision', it is associated with a object of 'content_item'. The object_type of that item is 'content_item' while the object_type of the new object is of type (or subtype of) 'content_revision'.

objects of type 'content_template' are different in that template revisions are placed in cr_revisions table even though 'content_template' is not a subtype of 'content_revision'.

Am I totally confused here?

Collapse
Posted by Dave Bauer on
You are correct. THis is sort of a bug, but since not many applications currently use content_template, we haven't taken the time to fix it. I am not sure exactly what the fix would be. It does seem to work the way it is right now.