Switch code/documentation/examples/tests to the new single-arg syntax
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSource.pm
index 3e74860..e5fb395 100644 (file)
@@ -1568,11 +1568,13 @@ sub _resolve_condition {
       $self->throw_exception ('Unable to determine relationship name for condition resolution');
     }
 
-    return $cond->(ref $for ? $as : $for,
-                   ref $for ? 'me' : $as,
-                   $self,
-                   $rel,
-                   ref $for ? $for : undef);
+    return $cond->({
+      self_alias => ref $for ? $as : $for,
+      foreign_alias => ref $for ? $self->related_source($rel)->resultset->current_source_alias : $as,
+      self_resultsource => $self,
+      foreign_relname => $rel,
+      self_rowobj => ref $for ? $for : undef
+    });
 
   } elsif (ref $cond eq 'HASH') {
     my %ret;