CC: | perl [...] minty.org |
Subject: | ResultSet->search loses result_class |
Given a resultset with a non-default result_class setting (like
DBIx::Class::ResultClass::HashRefInflator), calling ->search again loses
the result_class.
This seems to be similar to the bug fixed by r7860:
http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=7860
Patch with failing test (in 0.08119) attached. I'm afraid I'm not
familiar enough with the code to know if there are other similar code
paths that are likely to be affected in the same way.
Subject: | dbic_resultclass_test.diff |
diff --git a/t/inflate/hri.t b/t/inflate/hri.t
index fab040e..eb74da1 100644
--- a/t/inflate/hri.t
+++ b/t/inflate/hri.t
@@ -26,6 +26,9 @@ my $schema = DBICTest->init_schema();
my $cd1 = $rs->find ({cdid => 1});
is_deeply ( $cd1, $datahashref1, 'first/find return the same thing');
+
+ my $cd2 = $rs->search({ cdid => 1 })->single;
+ is_deeply ( $cd2, $datahashref1, 'first/search+single return the same thing');
}
sub check_cols_of {