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


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/dbix-class@lists.rawmode.org/

Reply via email to