my ($l, $r) = @{$n->{args}};
if (
is_Identifier($r) and @{$r->{elements}} == 2
- and $r->{elements}[0] eq $alias
+ and (!$alias or $r->{elements}[0] eq $alias)
) {
($l, $r) = ($r, $l);
}
if (
is_Identifier($l) and @{$l->{elements}} == 2
- and $l->{elements}[0] eq $alias
+ and (!$alias or $l->{elements}[0] eq $alias)
) {
$found{$l->{elements}[1]} = $r;
} elsif (($n->{operator}{Perl}||'') eq 'and') {
sub _extract_fixed_condition_columns {
my ($self, $where) = @_;
+ if (ref($where) eq 'REF' and ref($$where) eq 'HASH') {
+ # Yes. I know.
+ my $fixed = DBIx::Class::ResultSource->_extract_fixed_values_for($$where);
+ return [ keys %$fixed ];
+ }
+
return unless ref $where eq 'HASH';
my @cols;