How can I select only specific columns when using prefetch in DBIx-Class?
问题 I'm struggling with fairly fundamental DBIx-Class prefetch usage. I want to limit the columns that are returned from joined tables when prefetch is used. This: my $rs = $schema->resultset('CD')->search( {}, # No searching restrictions through WHERE clause { prefetch => [qw/ artist /], columns => [qw/ title artist.name /], } ); Generates this SQL: SELECT cd.title, artist.* FROM cd JOIN artist ON cd.artist = artist.id But I don't want to haul down all of the artist columns, just the cd.title