I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
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