rename _parent_rs to _parent_source
Matt S Trout [Thu, 6 Jul 2006 17:49:03 +0000 (17:49 +0000)]
Changes
lib/DBIx/Class/ResultSet.pm

diff --git a/Changes b/Changes
index b21d780..19080c1 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for DBIx::Class
 
+        - rename _parent_rs to _parent_source in ResultSet
+
 0.06999_05 2006-07-04 14:40:01
         - fix issue with incorrect $rs->{attrs}{alias}
         - fix subclassing issue with source_name
index 55f0098..69b0358 100644 (file)
@@ -235,7 +235,7 @@ sub search_rs {
   }
 
   my $rs = (ref $self)->new($self->result_source, $new_attrs);
-  $rs->{_parent_rs} = $self->{_parent_rs} if $self->{_parent_rs};
+  $rs->{_parent_source} = $self->{_parent_source} if $self->{_parent_source};
 
   unless (@_) {                 # no search, effectively just a clone
     my $rows = $self->get_cache;
@@ -694,7 +694,7 @@ sub _resolved_attrs {
   return $self->{_attrs} if $self->{_attrs};
 
   my $attrs = $self->{attrs};
-  my $source = $self->{_parent_rs} || $self->{result_source};
+  my $source = $self->{_parent_source} || $self->{result_source};
   my $alias = $attrs->{_orig_alias};
 
   # XXX - lose storable dclone
@@ -1019,7 +1019,7 @@ sub _count { # Separated out so pager can get the full count
   # offset, order by and page are not needed to count. record_filter is cdbi
   delete $attrs->{$_} for qw/rows offset order_by page pager record_filter/;
   my $tmp_rs = (ref $self)->new($self->result_source, $attrs);
-  $tmp_rs->{_parent_rs} = $self->{_parent_rs} if $self->{_parent_rs};
+  $tmp_rs->{_parent_source} = $self->{_parent_source} if $self->{_parent_source};
        #XXX - hack to pass through parent of related resultsets
 
   my ($count) = $tmp_rs->cursor->next;
@@ -1620,7 +1620,7 @@ sub related_resultset {
     );
 
     # keep reference of the original resultset
-    $rs->{_parent_rs} = $self->{_parent_rs} || $self->result_source;
+    $rs->{_parent_source} = $self->{_parent_source} || $self->result_source;
 
     return $rs;
   };