[Bast-commits] r8754 - in DBIx-Class/0.08/trunk: . lib/DBIx/Class
t/inflate
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri Feb 19 10:14:31 GMT 2010
Author: ribasushi
Date: 2010-02-19 10:14:30 +0000 (Fri, 19 Feb 2010)
New Revision: 8754
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/trunk/t/inflate/hri.t
Log:
Fix for RT54697
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2010-02-19 09:14:04 UTC (rev 8753)
+++ DBIx-Class/0.08/trunk/Changes 2010-02-19 10:14:30 UTC (rev 8754)
@@ -4,6 +4,7 @@
schemas get called on $schema->deploy
- Fix count() with group_by aliased-function resultsets
- Massive refactor and cleanup of primary key handling
+ - Fixed regression losing custom result_class (really this time)
0.08119 2010-02-15 09:36:00 (UTC)
- Add $rs->is_ordered to test for existing order_by on a resultset
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2010-02-19 09:14:04 UTC (rev 8753)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2010-02-19 10:14:30 UTC (rev 8754)
@@ -535,7 +535,7 @@
}
# Run the query
- my $rs = $self->search ($query, {result_class => $self->result_class, %$attrs});
+ my $rs = $self->search ($query, $attrs);
if (keys %{$rs->_resolved_attrs->{collapse}}) {
my $row = $rs->next;
carp "Query returned more than one row" if $rs->next;
@@ -1136,6 +1136,7 @@
if ($result_class) {
$self->ensure_class_loaded($result_class);
$self->_result_class($result_class);
+ $self->{attrs}{result_class} = $result_class if ref $self;
}
$self->_result_class;
}
Modified: DBIx-Class/0.08/trunk/t/inflate/hri.t
===================================================================
--- DBIx-Class/0.08/trunk/t/inflate/hri.t 2010-02-19 09:14:04 UTC (rev 8753)
+++ DBIx-Class/0.08/trunk/t/inflate/hri.t 2010-02-19 10:14:30 UTC (rev 8754)
@@ -26,6 +26,9 @@
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 {
More information about the Bast-commits
mailing list