[Dbix-class] PK::Auto and PostgreSQL 7.4.13

Jess Robinson castaway at desert-island.demon.co.uk
Mon Aug 7 09:40:26 CEST 2006



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


More information about the Dbix-class mailing list