From: Matt S Trout Date: Thu, 6 Jul 2006 17:49:03 +0000 (+0000) Subject: rename _parent_rs to _parent_source X-Git-Tag: v0.07002~75^2~55 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9fbd9bbd3f7018e100ef1f8ef46c2f1fa3bc079;p=dbsrgits%2FDBIx-Class.git rename _parent_rs to _parent_source --- diff --git a/Changes b/Changes index b21d780..19080c1 100644 --- 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 diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 55f0098..69b0358 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -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; };