Really fix INSERT RETURNING - simply make it a flag on the storage and keep the machi...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Row.pm
index 7716985..ceb38d5 100644 (file)
@@ -363,7 +363,7 @@ sub insert {
   my $updated_cols = $source->storage->insert(
     $source,
     { $self->get_columns },
-    keys %auto_pri
+    (keys %auto_pri) && $source->storage->can_insert_returning
       ? { returning => [ sort { $auto_pri{$a} cmp $auto_pri{$b} } keys %auto_pri ] }
       : ()
     ,