From: Matt S Trout Date: Mon, 6 Feb 2006 01:04:37 +0000 (+0000) Subject: Minor bugfix to SQLT parser X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d22bc4e37f787ce285f24cfd9dc835dcbff24551;p=dbsrgits%2FDBIx-Class-Historic.git Minor bugfix to SQLT parser --- diff --git a/lib/SQL/Translator/Parser/DBIx/Class.pm b/lib/SQL/Translator/Parser/DBIx/Class.pm index 3c75cbf..6ae4a60 100644 --- a/lib/SQL/Translator/Parser/DBIx/Class.pm +++ b/lib/SQL/Translator/Parser/DBIx/Class.pm @@ -90,7 +90,7 @@ sub parse { # for testing is # $schema->storage->dbh->do($_) for split(";\n", $sql); # -- mst (03:42 local time, please excuse any mistakes) - my $rel_table = $rel_info->{class}->table(); + my $rel_table = $source->related_source($rel)->name; my $cond = (keys (%{$rel_info->{cond}}))[0]; my ($refkey) = $cond =~ /^\w+\.(\w+)$/; if($rel_table && $refkey)