From: C.J. Adams-Collier Date: Mon, 2 Mar 2015 19:41:31 +0000 (-0800) Subject: Linked "prefetch" in columns documentation X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b339d2ef4c3eb1be34d4995c6334d88107d4a59c;p=dbsrgits%2FDBIx-Class-Historic.git Linked "prefetch" in columns documentation --- diff --git a/AUTHORS b/AUTHORS index 929e6f4..c6f307d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -43,6 +43,7 @@ caelum: Rafael Kitover caldrin: Maik Hentsche castaway: Jess Robinson chorny: Alexandr Ciornii +cj: C.J. Adams-Collier claco: Christopher H. Laco clkao: CL Kao Ctrl-O http://ctrlo.com/ diff --git a/Changes b/Changes index 6c6dbc9..2e6f3a9 100644 --- a/Changes +++ b/Changes @@ -28,7 +28,7 @@ Revision history for DBIx::Class * Misc - Remove warning about potential side effects of RT#79576 (scheduled) - - Various doc improvements (GH#72) + - Various doc improvements (GH#71, GH#72) - Skip tests in a way more intelligent and speedy manner when optional dependencies are missing - Make the Optional::Dependencies error messages cpanm-friendly diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 7e4cb4d..0076734 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -4083,13 +4083,13 @@ is the same as as => [qw(some_column dbic_slot)] If you want to individually retrieve related columns (in essence perform -manual prefetch) you have to make sure to specify the correct inflation slot +manual L) you have to make sure to specify the correct inflation slot chain such that it matches existing relationships: my $rs = $schema->resultset('Artist')->search({}, { # required to tell DBIC to collapse has_many relationships collapse => 1, - join => { cds => 'tracks'}, + join => { cds => 'tracks' }, '+columns' => { 'cds.cdid' => 'cds.cdid', 'cds.tracks.title' => 'tracks.title',