makes search_related on extended rels without the optimized version work. involves...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSource.pm
index 9d5f0dc..3e74860 100644 (file)
@@ -1568,7 +1568,11 @@ sub _resolve_condition {
       $self->throw_exception ('Unable to determine relationship name for condition resolution');
     }
 
-    return $cond->($for, ref $for ? 'me' : $as, $self, $rel, ref $for ? $for : undef);
+    return $cond->(ref $for ? $as : $for,
+                   ref $for ? 'me' : $as,
+                   $self,
+                   $rel,
+                   ref $for ? $for : undef);
 
   } elsif (ref $cond eq 'HASH') {
     my %ret;