From: Karen Etheridge Date: Wed, 11 Jun 2014 19:46:25 +0000 (-0700) Subject: replace all remaining uses of self_rowobj with self_resultobj in pod, test schemas X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=78b3d153ad874085ee183cfa6ad827089adde583;p=dbsrgits%2FDBIx-Class-Historic.git replace all remaining uses of self_rowobj with self_resultobj in pod, test schemas --- diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index e11263f..906307f 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -183,7 +183,7 @@ While every coderef-based condition must return a valid C clause, it may elect to additionally return a simplified join-free condition hashref when invoked as C<< $result->relationship >>, as opposed to C<< $rs->related_resultset('relationship') >>. In this case C<$result> is -passed to the coderef as C<< $args->{self_rowobj} >>, so a user can do the +passed to the coderef as C<< $args->{self_resultobj} >>, so a user can do the following: sub { @@ -194,8 +194,8 @@ following: "$args->{foreign_alias}.artist" => { -ident => "$args->{self_alias}.artistid" }, "$args->{foreign_alias}.year" => { '>', "1979", '<', "1990" }, }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.artist" => $args->{self_rowobj}->artistid, + $args->{self_resultobj} && { + "$args->{foreign_alias}.artist" => $args->{self_resultobj}->artistid, "$args->{foreign_alias}.year" => { '>', "1979", '<', "1990" }, }, ); diff --git a/t/lib/DBICTest/Schema/Artist.pm b/t/lib/DBICTest/Schema/Artist.pm index d1d0740..470796a 100644 --- a/t/lib/DBICTest/Schema/Artist.pm +++ b/t/lib/DBICTest/Schema/Artist.pm @@ -62,8 +62,8 @@ __PACKAGE__->has_many( return ( { "$args->{foreign_alias}.artist" => { '=' => { -ident => "$args->{self_alias}.artistid"} }, }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.artist" => $args->{self_rowobj}->artistid, + $args->{self_resultobj} && { + "$args->{foreign_alias}.artist" => $args->{self_resultobj}->artistid, } ); }, @@ -81,8 +81,8 @@ __PACKAGE__->has_many( { "$args->{foreign_alias}.artist" => { '=' => \ "$args->{self_alias}.artistid" }, "$args->{foreign_alias}.year" => { '>' => 1979, '<' => 1990 }, }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.artist" => { '=' => \[ '?', $args->{self_rowobj}->artistid ] }, + $args->{self_resultobj} && { + "$args->{foreign_alias}.artist" => { '=' => \[ '?', $args->{self_resultobj}->artistid ] }, "$args->{foreign_alias}.year" => { '>' => 1979, '<' => 1990 }, } ); @@ -102,8 +102,8 @@ __PACKAGE__->has_many( { "$args->{foreign_alias}.artist" => { -ident => "$args->{self_alias}.artistid" }, "$args->{foreign_alias}.year" => 1984, }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.artist" => $args->{self_rowobj}->artistid, + $args->{self_resultobj} && { + "$args->{foreign_alias}.artist" => $args->{self_resultobj}->artistid, "$args->{foreign_alias}.year" => 1984, } ); @@ -161,8 +161,8 @@ __PACKAGE__->has_many( { "$args->{foreign_alias}.artist" => { -ident => "$args->{self_alias}.artistid" }, "$args->{foreign_alias}.genreid" => undef, - }, $args->{self_rowobj} && { - "$args->{foreign_alias}.artist" => $args->{self_rowobj}->artistid, + }, $args->{self_resultobj} && { + "$args->{foreign_alias}.artist" => $args->{self_resultobj}->artistid, "$args->{foreign_alias}.genreid" => undef, } ), diff --git a/t/lib/DBICTest/Schema/Artwork.pm b/t/lib/DBICTest/Schema/Artwork.pm index 6fc8bb6..d9ddc33 100644 --- a/t/lib/DBICTest/Schema/Artwork.pm +++ b/t/lib/DBICTest/Schema/Artwork.pm @@ -36,8 +36,8 @@ __PACKAGE__->has_many('artwork_to_artist_test_m2m', 'DBICTest::Schema::Artwork_t return ( { "$args->{foreign_alias}.artwork_cd_id" => { -ident => "$args->{self_alias}.cd_id" }, }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.artwork_cd_id" => $args->{self_rowobj}->cd_id, + $args->{self_resultobj} && { + "$args->{foreign_alias}.artwork_cd_id" => $args->{self_resultobj}->cd_id, } ); } diff --git a/t/lib/DBICTest/Schema/Artwork_to_Artist.pm b/t/lib/DBICTest/Schema/Artwork_to_Artist.pm index eb5b333..e4c4cf2 100644 --- a/t/lib/DBICTest/Schema/Artwork_to_Artist.pm +++ b/t/lib/DBICTest/Schema/Artwork_to_Artist.pm @@ -33,8 +33,8 @@ __PACKAGE__->belongs_to('artist_test_m2m', 'DBICTest::Schema::Artist', { "$args->{foreign_alias}.artistid" => { -ident => "$args->{self_alias}.artist_id" }, "$args->{foreign_alias}.rank" => { '<' => 10 }, }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.artistid" => $args->{self_rowobj}->artist_id, + $args->{self_resultobj} && { + "$args->{foreign_alias}.artistid" => $args->{self_resultobj}->artist_id, "$args->{foreign_alias}.rank" => { '<' => 10 }, } ); diff --git a/t/lib/DBICTest/Schema/Track.pm b/t/lib/DBICTest/Schema/Track.pm index c09ff1d..a1cb27a 100644 --- a/t/lib/DBICTest/Schema/Track.pm +++ b/t/lib/DBICTest/Schema/Track.pm @@ -108,9 +108,9 @@ __PACKAGE__->has_many ( { "$args->{foreign_alias}.cd" => { -ident => "$args->{self_alias}.cd" }, "$args->{foreign_alias}.position" => { '>' => { -ident => "$args->{self_alias}.position" } }, }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.cd" => $args->{self_rowobj}->get_column('cd'), - "$args->{foreign_alias}.position" => { '>' => $args->{self_rowobj}->pos }, + $args->{self_resultobj} && { + "$args->{foreign_alias}.cd" => $args->{self_resultobj}->get_column('cd'), + "$args->{foreign_alias}.position" => { '>' => $args->{self_resultobj}->pos }, } ) }