From: Matt S Trout Date: Mon, 16 Apr 2012 16:52:54 +0000 (+0000) Subject: handle lack of source_name in join tagging code X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ea3e2bb7bcd10183b28ba0770d96ded68e0a1079;p=dbsrgits%2FDBIx-Class-Historic.git handle lack of source_name in join tagging code --- diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index f71e0ef..656c659 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -287,9 +287,11 @@ sub _resolve_aliastypes_from_select_args { unless $from_dq->{right}{type} eq DQ_ALIAS; push @alias_dq, $from_dq->{right}; $join_dq{$from_dq->{right}} = $from_dq; - my @columns = $schema->source($from_dq->{right}{'dbix-class.source_name'}) - ->columns; - @col_map{@columns} = ($from_dq->{right}{to}) x @columns; + if (my $source_name = $from_dq->{right}{'dbix-class.source_name'}) { + my @columns = $schema->source($source_name) + ->columns; + @col_map{@columns} = ($from_dq->{right}{to}) x @columns; + } $from_dq = $from_dq->{left}; } die "Don't understand this from"