Posted on 2008-01-25 13:48:30-08 by slj
Error messages not thrown for insert update connect failures
Hi, We just upgraded from on older version of DBIx to the latest version. The latest version doesn't throw proper error messages when insert/update/connect fails. This is the sample code that I run
my $user = $db->resultset('User')->create({id => 'slj', email => 'slj@yahoo.com'});
The code should throw a unique constraint violation but this is what I get
$ ./get_user.pl Can't call method "resolve" on an undefined value at /usr/local/perl/5.8.7/lib/DBIx/Class/Row.pm li +ne 707.
The same code gave the follwing error with older version of DBIx.
$ ~/prog/get_user.pl DBD::ODBC::st execute failed: [unixODBC][TimesTen][TimesTen 7.0.1.0.0 ODBC Driver][TimesTen]TT0907: + Unique constraint (TTUNIQUE_34) violated at Rowid <0x018d19ac> -- file "ttree.c", lineno 4077, pr +ocedure "sbTtInsert" (SQL-23000)(DBD: st_execute/SQLExecute err=-1) at /usr/local/perl/5.8.7/lib/D +BIx/Class/Storage/DBI.pm line 771. DBIx::Class::PK::Auto::insert(): Error executing 'INSERT INTO users (email, id) VALUES (?, ?, )': [ +unixODBC][TimesTen][TimesTen 7.0.1.0.0 ODBC Driver][TimesTen]TT0907: Unique constraint (TTUNIQUE_3 +4) violated at Rowid <0x018d19ac> -- file "ttree.c", lineno 4077, procedure "sbTtInsert" (SQL-2300 +0)(DBD: st_execute/SQLExecute err=-1) ....
Has anyone faced this issue? Is this a bug with DBIx or I am missing something? Could someone help on this? Thanks, Libitha
Direct Responses: 7882 | 7910 | Write a response
Posted on 2008-05-15 00:18:19-07 by digiphaze in response to 6925
Re: Error messages not thrown for insert update connect failures
I've been receiving a similar error (different line no). However in my case, I'm not sure its due to a constraint violation as I've double and triple checked the values being passed into the new object.

Can't call method "resolve" on an undefined value at /usr/local/share/perl/5.8.8/DBIx/Class/Row.pm line 723.

I'm still investigating this and will let you know if I figure it out.
Direct Responses: Write a response
Posted on 2008-05-20 09:18:44-07 by castaway in response to 6925
Re: Error messages not thrown for insert update connect failures
You guys may want to post these problems on the actual DBIx::Class mailing list or come on to the IRC channel.. I don't think any/many of the DBIC devs read CPANForum.. Jess
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.