Merge 'trunk' into 'grouped_has_many_join'
Peter Rabbitson [Thu, 20 Aug 2009 15:48:55 +0000 (15:48 +0000)]
r7346@Thesaurus (orig r7343):  robkinyon | 2009-08-19 21:44:48 +0200
Applied doc patch by spb
r7347@Thesaurus (orig r7344):  ribasushi | 2009-08-20 07:50:49 +0200
Fix a weird-ass sqlt invocation in deployment_statements()
r7348@Thesaurus (orig r7345):  ribasushi | 2009-08-20 08:19:07 +0200
Apply pod patch by arthas (slightly modified)
r7353@Thesaurus (orig r7350):  abraxxa | 2009-08-20 15:07:29 +0200
pod patch for 'Tracing SQL' examples

t/prefetch/grouped.t

index 8e07612..8c29115 100644 (file)
@@ -271,4 +271,16 @@ for ($cd_rs->all) {
   );
 }
 
+{
+    $schema->storage->debug(1);
+    my $cd_rs = $schema->resultset('CD')->search(undef, {
+            distinct => 1,
+            join     => [qw/ tracks /],
+            prefetch => [qw/ artist /],
+        });
+    
+    is($cd_rs->all, 5, 'search with has_many join and distinct ok');
+    $schema->storage->debug(0);
+}
+
 done_testing;