[Bast-commits] r3452 - branches/DBIx-Class-current/t
jshirley at dev.catalyst.perl.org
jshirley at dev.catalyst.perl.org
Fri Jun 1 00:13:07 GMT 2007
Author: jshirley
Date: 2007-06-01 00:13:06 +0100 (Fri, 01 Jun 2007)
New Revision: 3452
Modified:
branches/DBIx-Class-current/t/76joins.t
Log:
Adding failing test for left-join with no join record present
Modified: branches/DBIx-Class-current/t/76joins.t
===================================================================
--- branches/DBIx-Class-current/t/76joins.t 2007-05-31 22:18:06 UTC (rev 3451)
+++ branches/DBIx-Class-current/t/76joins.t 2007-05-31 23:13:06 UTC (rev 3452)
@@ -16,7 +16,7 @@
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 @@
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);
More information about the Bast-commits
mailing list