[Bast-commits] r7147 -
DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Thu Jul 30 14:26:48 GMT 2009
Author: caelum
Date: 2009-07-30 14:26:47 +0000 (Thu, 30 Jul 2009)
New Revision: 7147
Modified:
DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI.pm
Log:
make sure the new mssql insert method works on an un-reblessed storage
Modified: DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI.pm 2009-07-30 14:20:02 UTC (rev 7146)
+++ DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI.pm 2009-07-30 14:26:47 UTC (rev 7147)
@@ -1142,12 +1142,16 @@
sub insert {
my ($self, $source, $to_insert) = @_;
+ if ((not $self->_dbh) && ref($self) eq __PACKAGE__) {
+ $self->_determine_driver;
+ goto $self->can('insert');
+ }
+
my $ident = $source->from;
my $bind_attributes = $self->source_bind_attributes($source);
my $updated_cols = {};
- $self->ensure_connected;
foreach my $col ( $source->columns ) {
if ( !defined $to_insert->{$col} ) {
my $col_info = $source->column_info($col);
More information about the Bast-commits
mailing list