From: Rafael Kitover Date: Tue, 2 Feb 2010 13:33:57 +0000 (+0000) Subject: deref table name if needed, check all columns for identity column not just PK X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=54e39a077e4e7b593118cc3e83571266c3f44fe9;p=dbsrgits%2FDBIx-Class-Historic.git deref table name if needed, check all columns for identity column not just PK --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/ASA.pm b/lib/DBIx/Class/Storage/DBI/Sybase/ASA.pm index 9820060..59c9ae9 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/ASA.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/ASA.pm @@ -40,9 +40,10 @@ sub insert { if (not $is_identity_insert) { my ($identity_col) = grep $source->column_info($_)->{is_auto_increment}, - $source->primary_columns; + $source->columns; my $dbh = $self->_get_dbh; my $table_name = $source->from; + $table_name = $$table_name if ref $table_name; my ($identity) = $dbh->selectrow_array("SELECT GET_IDENTITY('$table_name')");