X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fstandard.t;h=493b538756ebc92f1b1d7e17c97afb96fd592f80;hb=43245ada4afbf6da16d58e939913550fbb87a1bd;hp=4c1c004cc398c92315e95f7fe61d0d76ee2c472a;hpb=0e773352a9c6c034dfb2526b8d68bf6ac1e2323b;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/standard.t b/t/prefetch/standard.t index 4c1c004..493b538 100644 --- a/t/prefetch/standard.t +++ b/t/prefetch/standard.t @@ -2,7 +2,6 @@ use strict; use warnings; use Test::More; -use Test::Exception; use lib qw(t/lib); use DBICTest; @@ -40,7 +39,7 @@ $schema->storage->debugobj->callback(undef); # test for partial prefetch via columns attr my $cd = $schema->resultset('CD')->find(1, { - columns => [qw/title artist artist.name/], + columns => [qw/title artist artist.name/], join => { 'artist' => {} } } ); @@ -216,7 +215,7 @@ is(eval { $tree_like->children->first->children->first->name }, 'quux', 'Tree search_related with prefetch ok'); $tree_like = eval { $schema->resultset('TreeLike')->search( - { 'children.id' => 3, 'children_2.id' => 6 }, + { 'children.id' => 3, 'children_2.id' => 6 }, { join => [qw/children children children/] } )->search_related('children', { 'children_4.id' => 7 }, { prefetch => 'children' } )->first->children->first; }; @@ -254,6 +253,11 @@ sub make_hash_struc { my $rs = shift; my $struc = {}; + # all of these ought to work, but do not for some reason + # a noop cloning search() pollution? + #foreach my $art ( $rs->search({}, { order_by => 'me.artistid' })->all ) { + #foreach my $art ( $rs->search({}, {})->all ) { + #foreach my $art ( $rs->search()->all ) { foreach my $art ( $rs->all ) { foreach my $cd ( $art->cds ) { foreach my $track ( $cd->tracks ) {