Forum OpenACS Development: Re: rel_types::new creates bad autogenerated package

Collapse
Posted by Miguel Marin on
Im also having some problems with the content::item::new function on Oracle. Im using content::item::new from oacs-5-1 to create one item in the CR as follows:

set item_id [content::item::new -name $course_key -parent_id $folder_id -content_type "dotlrn_catalog" -creation_user $user_id -attributes $form_attributes -is_live t -title $course_key]

it supposed to create on row in table dotlrn_catalog table with the attributes from variable $form_attributes and create a new revision. In postgres everithing works fine but in oracle it only creates one new item and doesn't fill the table and doesn't create a new revision. The attribute table and the neccesary stuff for the items were created as follows:

content::type::new -content_type "dotlrn_catalog" \
-pretty_name "DotLRN Catalog" \
-pretty_plural "DotLRN Catalog" \
-table_name "dotlrn_catalog" \
-id_column "course_id"

# now set up the attributes that by default we need for the course
content::type::attribute::new \
-content_type "dotlrn_catalog" \
-attribute_name "course_key" \
-datatype "string" \
-pretty_name "Course Key" \
-pretty_plural "Course Key" \
-sort_order 1 \
-column_spec "varchar(50)"

content::type::attribute::new \
-content_type "dotlrn_catalog" \
-attribute_name "course_name" \
-datatype "string" \
-pretty_name "Course Name" \
-sort_order 2 \
-column_spec "varchar(200)"

content::type::attribute::new \
-content_type "dotlrn_catalog" \
-attribute_name "course_info" \
-datatype "text" \
-pretty_name "Course Information" \
-sort_order 3 \
-column_spec "text"

content::type::attribute::new \
-content_type "dotlrn_catalog" \
-attribute_name "assessment_id" \
-datatype "integer" \
-pretty_name "Assessment ID" \

# To store the courses in the content repository

set folder_id [content::folder::new -name "DotLRN Catalog" -label "DotLRN Catalog"]
content::folder::register_content_type -folder_id $folder_id
-content_type "dotlrn_catalog" -sort_order 4 -column_spec "integer"