From: Rafael Kitover Date: Sat, 6 Mar 2010 17:12:55 +0000 (+0000) Subject: cache autoinc sequence in column_info X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2bb7215e289d520bef1a95933210d639fc14a20;p=dbsrgits%2FDBIx-Class-Historic.git cache autoinc sequence in column_info --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 4d4af27..221fa6e 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1378,7 +1378,7 @@ sub insert { if ( $col_info->{auto_nextval} ) { $updated_cols->{$col} = $to_insert->{$col} = $self->_sequence_fetch( 'nextval', - $col_info->{sequence} || + $col_info->{sequence} ||= $self->_dbh_get_autoinc_seq($self->_get_dbh, $source, $col) ); }