From: Rafael Kitover Date: Sat, 6 Mar 2010 23:15:13 +0000 (+0000) Subject: don't die on insert in firebird with no pk X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7f46488fb414b0bad12f2f164d81485b290f8cb;p=dbsrgits%2FDBIx-Class-Historic.git don't die on insert in firebird with no pk --- diff --git a/lib/DBIx/Class/Storage/DBI/InterBase.pm b/lib/DBIx/Class/Storage/DBI/InterBase.pm index 7487bd9..2e5d706 100644 --- a/lib/DBIx/Class/Storage/DBI/InterBase.pm +++ b/lib/DBIx/Class/Storage/DBI/InterBase.pm @@ -42,7 +42,7 @@ sub _prep_for_execute { if ($op eq 'insert') { $self->_auto_incs([]); - my @pk = $ident->_pri_cols; + my @pk = eval { local $@; $ident->_pri_cols }; my %pk; @pk{@pk} = ();