[Bast-commits] r7146 - DBIx-Class/0.08/trunk/lib/DBIx/Class

robkinyon at dev.catalyst.perl.org robkinyon at dev.catalyst.perl.org
Thu Jul 30 14:20:02 GMT 2009


Author: robkinyon
Date: 2009-07-30 14:20:02 +0000 (Thu, 30 Jul 2009)
New Revision: 7146

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
Fixed caveats

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm	2009-07-30 14:13:21 UTC (rev 7145)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm	2009-07-30 14:20:02 UTC (rev 7146)
@@ -3377,7 +3377,8 @@
 B<NOTE:> If you specify a C<prefetch> attribute, the C<join> and C<select>
 attributes will be ignored.
 
-B<CAVEATs>:
+B<CAVEATs>: Prefetch does a lot of deep magic. As such, it may not behave
+exactly as you might expect.
 
 =over 4
 
@@ -3390,7 +3391,9 @@
 traversing a relationship. So, if you have C<Foo->has_many(Bar)> and you do
 
   my $foo_rs = Foo->search({
-      'bar.col1' => $value,
+      'bars.col1' => $value,
+  }, {
+      join => 'bars',
   });
 
   my $count = $foo_rs->first->bars->count;
@@ -3401,7 +3404,8 @@
 
   cmp_ok( $count, '==', $prefetch_count, "Counts should be the same" );
 
-that cmp_ok() may or may not pass depending on the datasets involved.
+that cmp_ok() may or may not pass depending on the datasets involved. This
+behavior may or may not survive the 0.09 transition.
 
 =back
 




More information about the Bast-commits mailing list