[Bast-commits] r8551 -
DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Fri Feb 5 10:07:14 GMT 2010
Author: caelum
Date: 2010-02-05 10:07:14 +0000 (Fri, 05 Feb 2010)
New Revision: 8551
Modified:
DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm
Log:
support autoinc PKs without is_auto_increment set
Modified: DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm 2010-02-05 09:46:31 UTC (rev 8550)
+++ DBIx-Class/0.08/branches/storage-interbase/lib/DBIx/Class/Storage/DBI/InterBase.pm 2010-02-05 10:07:14 UTC (rev 8551)
@@ -19,10 +19,16 @@
my ($sql, $bind) = $self->next::method (@_);
if ($op eq 'insert') {
+ my @pk = $ident->primary_columns;
+ my %pk;
+ @pk{@pk} = ();
+
my @auto_inc_cols = grep {
my $inserting = $args->[0]{$_};
- $ident->column_info($_)->{is_auto_increment} && (
+ ($ident->column_info($_)->{is_auto_increment}
+ || exists $pk{$_})
+ && (
(not defined $inserting)
||
(ref $inserting eq 'SCALAR' && $$inserting =~ /^null\z/i)
More information about the Bast-commits
mailing list