Relationship documentation on extended (custom) relationship conditions
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Relationship / ManyToMany.pm
index 6e507c7..c588419 100644 (file)
@@ -135,10 +135,10 @@ EOW
       my $cond = $rel_source->relationship_info($f_rel)->{cond};
       my $link_cond;
       if (ref $cond eq 'CODE') {
-        my ($cond1, $cond2) = $rel_source->_resolve_condition
+        my ($cond_should_join, $cond_optimized) = $rel_source->_resolve_condition
           ($cond, $obj, $f_rel);
-        if ($cond2) {
-          $link_cond = $cond2;
+        if ($cond_optimized) {
+          $link_cond = $cond_optimized;
         } else {
           $self->throw_exception('Extended relationship '.$rel.
                                  ' requires optimized version for ManyToMany.');