Forum OpenACS Q&A: Re: Instance aware ecommerce package

Collapse
Posted by Dave McBride on
I have the PostgreSQL version up and running nicely.

I am having difficulties with the Oracle version. I have run into the integrity constraint problem:
------------------------------------------------
ora8.c:3568:ora_tcl_command: error in `OCIStmtExecute ()': ORA-02291: integrity constraint (OPENACS46.ACS_OBJECTS_OBJECT_TYPE_FK) violated - parent key not found
ORA-06512: at "OPENACS46.ACS_OBJECT", line 68
ORA-06512: at "OPENACS46.EC_CATEGORY", line 17
ORA-06512: at line 3

SQL:
        begin
            :1 := ec_category.new (
        category_id => :category_id,
        category_name => :category_name,
        sort_key => :sort_key,
        last_modified => sysdate,
        last_modifying_user => :user_id,
        modified_ip_address => :creation_ip,
        creation_user => :user_id,
        creation_ip => :creation_ip,
        context_id => :package_id
                );
            end;

    while executing
"ns_ora exec_plsql_bind nsdb0 {
        begin
            :1 := ec_category.new (
        category_id => :category_id,
        category_name => :category_name,
        sort_k..."
    ("uplevel" body line 1)
-----------------------------------------------------

I seem to be able to create 1 type of object such as a template or category, then no other object.  Any suggestions?

Dave

Collapse
Posted by Dave McBride on
A solution was found.

See if there is a line in the    acs_object_type.create_type
call such as this:

package_name  => 'NAME'

For some reason, this line allows only one object type to be created for that package name.  I removed it from my calls and  the error does not occur.

Dave