From: Karen Etheridge Date: Thu, 27 Oct 2016 19:55:47 +0000 (-0700) Subject: fix missing punctuation in ::Relationship::Base, and make consistent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f6bf1ce834acd71016d562044fd2d2af3bfeabdd;p=dbsrgits%2FDBIx-Class.git fix missing punctuation in ::Relationship::Base, and make consistent --- diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index b7e74eb..5d526d8 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -344,7 +344,7 @@ Then, assuming MyApp::Schema::LinerNotes has an accessor named notes, you can do For a 'belongs_to relationship, note the 'cascade_update': - MyApp::Schema::Track->belongs_to( cd => 'MyApp::Schema::CD', 'cd, + MyApp::Schema::Track->belongs_to( cd => 'MyApp::Schema::CD', 'cd', { proxy => ['title'], cascade_update => 1 } ); $track->title('New Title'); @@ -355,9 +355,9 @@ For a 'belongs_to relationship, note the 'cascade_update': A hashref where each key is the accessor you want installed in the main class, and its value is the name of the original in the foreign class. - MyApp::Schema::Track->belongs_to( cd => 'MyApp::Schema::CD', 'cd', { - proxy => { cd_title => 'title' }, - }); + MyApp::Schema::Track->belongs_to( cd => 'MyApp::Schema::CD', 'cd', + { proxy => { cd_title => 'title' } } + ); This will create an accessor named C on the C<$track> result object. @@ -365,9 +365,9 @@ This will create an accessor named C on the C<$track> result object. NOTE: you can pass a nested struct too, for example: - MyApp::Schema::Track->belongs_to( cd => 'MyApp::Schema::CD', 'cd', { - proxy => [ 'year', { cd_title => 'title' } ], - }); + MyApp::Schema::Track->belongs_to( cd => 'MyApp::Schema::CD', 'cd', + { proxy => [ 'year', { cd_title => 'title' } ] } + ); =item accessor