On Sun, 6 Aug 2006, Adam Sjøgren wrote:

Having just upgraded to the latest Catalyst and DBIx::Class in Debian
unstable, I've run into a slight problem.

When I try to $c->model('DBIC::User)->create(...), I get an error:

Caught exception in Myapp::Controller::User->create
"DBIx::Class::ResultSet::create(): Can't get last insert id at
/var/www/Myapp/script/../lib/Myapp/Controller/User.pm
line 71"

Are you setting the "sequence" key in your column_info? ->add_columns('myidfield' => { sequence => 'seqname' } .. ?

It seems that some versions of DBD::Pg have problems with last_insert_id, sequence setting should always work..

Jess
_______________________________________________
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/[email protected]/

Reply via email to