From: Matt S Trout Date: Fri, 15 Nov 2013 19:03:50 +0000 (+0000) Subject: let rowparser introspect DQ join conds X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e36cd061c29edd8f0e81e6802e1db123e77c228;p=dbsrgits%2FDBIx-Class.git let rowparser introspect DQ join conds --- diff --git a/lib/DBIx/Class/ResultSource/RowParser.pm b/lib/DBIx/Class/ResultSource/RowParser.pm index 8f4a317..498d9ac 100644 --- a/lib/DBIx/Class/ResultSource/RowParser.pm +++ b/lib/DBIx/Class/ResultSource/RowParser.pm @@ -9,6 +9,7 @@ use base 'DBIx::Class'; use Try::Tiny; use List::Util qw(first max); use B 'perlstring'; +use Scalar::Util qw(blessed); use DBIx::Class::ResultSource::RowParser::Util qw( assemble_simple_parser @@ -200,6 +201,9 @@ sub _resolve_collapse { $_ =~ s/^ (?: foreign | self ) \.//x for ($f, $s); $relinfo->{$rel}{fk_map}{$s} = $f; } + } elsif (blessed($cond) and $cond->isa('Data::Query::ExprBuilder')) { + my $cols = $self->_join_condition_to_hashref($cond->{expr}); + @{$relinfo->{$rel}{fk_map}}{values %$cols} = keys %$cols; } }