X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F76joins.t;fp=t%2F76joins.t;h=f384d4d1f89d22a40cc42be7f590b7ebda4eef9b;hb=8206c013c33230647783d08fa5635d59f2d0893a;hp=c03df6bbe4c3a56561e5ad240aaf6a04b643c658;hpb=d944c5aea7c21750ce97107aacb50db173ff2ddb;p=dbsrgits%2FDBIx-Class.git diff --git a/t/76joins.t b/t/76joins.t index c03df6b..f384d4d 100644 --- a/t/76joins.t +++ b/t/76joins.t @@ -16,7 +16,7 @@ BEGIN { eval "use DBD::SQLite"; plan $@ ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( tests => 62 ); + : ( tests => 63 ); } # figure out if we've got a version of sqlite that is older than 3.2.6, in @@ -336,6 +336,22 @@ SKIP: { is($rs->next->name, 'Caterwauler McCrae', "Correct artist returned"); +TODO: { + local $TODO = 'left join on prefetch to return valid rows'; + my $cd = $schema->resultset('Artist')->first->create_related('cds', + { + title => 'Unproduced Single', + year => 2007 + }); + + my $left_join = $schema->resultset('CD')->search( + { 'me.cdid' => $cd->cdid }, + { prefetch => { cd_to_producer => 'producer' } } + ); + + cmp_ok($left_join, '==', 1, 'prefetch with no join record present'); +} + $queries = 0; $schema->storage->debugcb(sub { $queries++ }); $schema->storage->debug(1);