From: Peter Rabbitson Date: Wed, 10 Jun 2009 11:43:31 +0000 (+0000) Subject: What was I thinking - resultsource does not have an ->alias X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e4068057ce84efb5ab9038ef63cb09877c62b1a;p=dbsrgits%2FDBIx-Class-Historic.git What was I thinking - resultsource does not have an ->alias --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index c9f816e..f70384d 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1023,7 +1023,7 @@ sub _execute { sub insert { my ($self, $source, $to_insert) = @_; - my $ident = $source->from; + my $ident = $source->from; my $bind_attributes = $self->source_bind_attributes($source); my $updated_cols = {}; @@ -1287,7 +1287,8 @@ sub _resolve_ident_sources { # the reason this is so contrived is that $ident may be a {from} # structure, specifying multiple tables to join if ( Scalar::Util::blessed($ident) && $ident->isa("DBIx::Class::ResultSource") ) { - $alias2source->{$ident->alias} = $ident; + # this is compat mode for insert/update/delete which do not deal with aliases + $alias2source->{me} = $ident; } elsif (ref $ident eq 'ARRAY') {