From: John Napiorkowski Date: Mon, 7 Jul 2008 19:16:32 +0000 (+0000) Subject: added some notes in the tests and fixed get_from_storage to actually use the new... X-Git-Tag: v0.08240~402^2~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c7ae12e76a6d290d731b4a8d709f7eee587c879;p=dbsrgits%2FDBIx-Class.git added some notes in the tests and fixed get_from_storage to actually use the new resultset attribute --- diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 71629e3..798f4fa 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -810,7 +810,7 @@ whatever your Row object is. 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 diff --git a/t/93storage_replication.t b/t/93storage_replication.t index d03f5c6..3de346a 100644 --- a/t/93storage_replication.t +++ b/t/93storage_replication.t @@ -569,7 +569,7 @@ ok $replicated->schema->resultset('Artist')->find(1) => '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 @@ ok $replicated->schema->resultset('Artist')->find(1) => '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