Artist has_many CDs.
Assuming a method gets an artist result set $artist_rs.
I want all CDs of the artists of $artist_rs:
while ($artist = $artist_rs->next) {
$cd_rs = $artist_rs->cds;
}
This does an extra query for each artist.
Prefetching a has_many relation is not possible (says the manual).
How do I select all CDs of the artists of $artist_rs with one query?
Bernhard Graf
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]