revert last Sybase changes
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Relationship / Base.pm
index 9e4a35a..8c2e4fd 100644 (file)
@@ -189,7 +189,7 @@ sub related_resultset {
     my $query = ((@_ > 1) ? {@_} : shift);
 
     my $source = $self->result_source;
-    my $cond = $source->resolve_condition(
+    my $cond = $source->_resolve_condition(
       $rel_obj->{cond}, $rel, $self
     );
     if ($cond eq $DBIx::Class::ResultSource::UNRESOLVABLE_CONDITION) {
@@ -209,7 +209,7 @@ sub related_resultset {
         if (ref $_ eq 'HASH') {
           my $hash;
           foreach my $key (keys %$_) {
-            my $newkey = $key =~ /\./ ? "me.$key" : $key;
+            my $newkey = $key !~ /\./ ? "me.$key" : $key;
             $hash->{$newkey} = $_->{$key};
           }
           $hash;
@@ -404,7 +404,7 @@ sub set_from_related {
       unless Scalar::Util::blessed($f_obj) and $f_obj->isa($f_class);
   }
   $self->set_columns(
-    $self->result_source->resolve_condition(
+    $self->result_source->_resolve_condition(
        $rel_obj->{cond}, $f_obj, $rel));
   return 1;
 }
@@ -470,7 +470,7 @@ B<Currently only available for C<many-to-many> relationships.>
 
 =over 4
 
-=item Arguments: (\@hashrefs | \@objs)
+=item Arguments: (\@hashrefs | \@objs), $link_vals?
 
 =back
 
@@ -481,6 +481,10 @@ B<Currently only available for C<many-to-many> relationships.>
   $actor->set_roles(\@roles);
      # Replaces all of $actor's previous roles with the two named
 
+  $actor->set_roles(\@roles, { salary => 15_000_000 });
+     # Sets a column in the link table for all roles
+
+
 Replace all the related objects with the given reference to a list of
 objects. This does a C<delete> B<on the link table resultset> to remove the
 association between the current object and all related objects, then calls