From: David Kamholz Date: Sun, 10 Dec 2006 16:25:22 +0000 (+0000) Subject: add test for has_many prefetch with adjacent rows with no rel objects X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a08c907fa29ab33d219bd6713e21ab40f9a7e752;p=dbsrgits%2FDBIx-Class-Historic.git add test for has_many prefetch with adjacent rows with no rel objects --- diff --git a/t/76joins.t b/t/76joins.t index 806185c..ad406fe 100644 --- a/t/76joins.t +++ b/t/76joins.t @@ -364,6 +364,12 @@ like( $sql, qr/^SELECT tracks_2\.trackid/, "join not collapsed for search_relate $schema->storage->debug($orig_debug); $schema->storage->debugobj->callback(undef); +$rs = $schema->resultset('Artist'); +$rs->create({ artistid => 4, name => 'Unknown singer-songwriter' }); +$rs->create({ artistid => 5, name => 'Emo 4ever' }); +@artists = $rs->search(undef, { prefetch => 'cds', order_by => 'artistid' }); +is(scalar @artists, 5, 'has_many prefetch with adjacent empty rows ok'); + # ------------- # # Tests for multilevel has_many prefetch