Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 54697
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: arc [...] cpan.org
Cc: perl [...] minty.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.08120



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 {
On Wed Feb 17 09:08:35 2010, ARC wrote: Show quoted text
> 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.
Right, the original fix was bogus. Fixed in trunk, will release with 0.08120. http://dev.catalyst.perl.org/svnweb/bast/revision?rev=8754