[Dbix-class] Foreign key violation error
Ramprabhu Kaliaperumal
ramprabhu.kaliaperumal at oracle.com
Fri Jul 13 05:57:56 GMT 2007
Hi All
I am getting a strange error while inserting the records to child table
from master table object.
I am using create_related() method to insert child table record, but
still I am getting Foreign Key violation error.
Error says there is no parent key available. Wondering how come this
error when I am create_related method.
Pasting the error here...
DBD::ODBC::st execute failed: [unixODBC][TimesTen][TimesTen 7.0.1.0.0
ODBC Driver][TimesTen]TT3001: Foreign key violation [CUSTOMER]: the row
in child table RKALIAPE.CUSTOMERCONTACT has no key in the parent table
RKALIAPE.CUSTOMER -- file "constr.c", lineno 2159, procedure
"sbSmxCheckAllConstr()" (SQL-23000)(DBD: st_execute/SQLExecute err=-1)
at /.../DBIx/Class/Storage/DBI.pm line 743.
DBIx::Class::Relationship::Base::create_related(): Error executing
'INSERT INTO CustomerContact (customer_number, field_name, field_value)
VALUES (?, ?, ?)': [unixODBC][TimesTen][TimesTen 7.0.1.0.0 ODBC
Driver][TimesTen]TT3001: Foreign key violation [CUSTOMER]: the row in
child table RKALIAPE.CUSTOMERCONTACT has no key in the parent table
RKALIAPE.CUSTOMER -- file "constr.c", lineno 2159, procedure
"sbSmxCheckAllConstr()" (SQL-23000)(DBD: st_execute/SQLExecute err=-1)
at /..../Customer.pm line 63
Thanks in advance.
Regards
-Ram
More information about the Dbix-class
mailing list