Am 08.04.2010 20:55, schrieb Bernhard Graf:
>
> for my $row ($rs->all) {
> say join(', ', $row->cds->get_column('title')->all);
> }
>
> it still fetched each of the CDs again one by one.
>
> Changing this to
>
> for my $row ($rs->all) {
> say join(',', map {$_->role_id} $row->user2roles->all);
> }
oops, I mean:
for my $row ($rs->all) {
say join(',', map {$_->title} $row->cds->all);
}
> fixed it indeed: no more additional queries. :)
_______________________________________________
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]