[Bast-commits] r4558 - in DBIx-Class/0.08/branches/replication_dedux: lib/DBIx/Class t

jnapiorkowski at dev.catalyst.perl.org jnapiorkowski at dev.catalyst.perl.org
Mon Jul 7 20:16:48 BST 2008


Author: jnapiorkowski
Date: 2008-07-07 20:16:32 +0100 (Mon, 07 Jul 2008)
New Revision: 4558

Modified:
   DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Row.pm
   DBIx-Class/0.08/branches/replication_dedux/t/93storage_replication.t
Log:
added some notes in the tests and fixed get_from_storage to actually use the new resultset attribute

Modified: DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Row.pm	2008-07-07 18:58:37 UTC (rev 4557)
+++ DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Row.pm	2008-07-07 19:16:32 UTC (rev 4558)
@@ -810,7 +810,7 @@
 sub get_from_storage {
     my $self = shift @_;
     my @primary_columns = map { $self->$_ } $self->primary_columns;
-    return $self->result_source->resultset->find(@primary_columns); 	
+    return $self->result_source->resultset->search(undef, {execute_reliably=>1})->find(@primary_columns); 	
 }
 
 =head2 throw_exception

Modified: DBIx-Class/0.08/branches/replication_dedux/t/93storage_replication.t
===================================================================
--- DBIx-Class/0.08/branches/replication_dedux/t/93storage_replication.t	2008-07-07 18:58:37 UTC (rev 4557)
+++ DBIx-Class/0.08/branches/replication_dedux/t/93storage_replication.t	2008-07-07 19:16:32 UTC (rev 4558)
@@ -569,7 +569,7 @@
        => 'Got expected single result from transaction';	  
 }     
 
-## Private attribute tests
+## Test the reliable_storage resultset attribute.
 
 {
 	ok my $artist_rs = $replicated->schema->resultset('Artist')
@@ -580,7 +580,7 @@
         => 'Created a resultset using reliable storage';
 	   
     ok my $artist = $reliable_artist_rs->find(2) 
-        => 'got an artist to test see the attributes';
+        => 'got an artist result via reliable storage';
 }
 
 ## Delete the old database files




More information about the Bast-commits mailing list