[Bast-commits] r5518 - in DBIx-Class/0.08/branches/subquery:
lib/DBIx/Class t/search
robkinyon at dev.catalyst.perl.org
robkinyon at dev.catalyst.perl.org
Wed Feb 18 19:10:51 GMT 2009
Author: robkinyon
Date: 2009-02-18 19:10:51 +0000 (Wed, 18 Feb 2009)
New Revision: 5518
Modified:
DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/branches/subquery/t/search/subquery.t
Log:
Alias properly checks ->{attrs}{alias}
Modified: DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm 2009-02-18 16:52:42 UTC (rev 5517)
+++ DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm 2009-02-18 19:10:51 UTC (rev 5518)
@@ -2320,7 +2320,7 @@
push(@{$attrs->{as}}, @$adds);
}
- $attrs->{from} ||= [ { 'me' => $source->from } ];
+ $attrs->{from} ||= [ { $self->{attrs}{alias} => $source->from } ];
if (exists $attrs->{join} || exists $attrs->{prefetch}) {
my $join = delete $attrs->{join} || {};
Modified: DBIx-Class/0.08/branches/subquery/t/search/subquery.t
===================================================================
--- DBIx-Class/0.08/branches/subquery/t/search/subquery.t 2009-02-18 16:52:42 UTC (rev 5517)
+++ DBIx-Class/0.08/branches/subquery/t/search/subquery.t 2009-02-18 19:10:51 UTC (rev 5518)
@@ -93,4 +93,6 @@
);
}
+my $rs = $cdrs->search( undef, { alias => 'foo' } );
+warn ${$rs->as_query}->[0], $/;
__END__
More information about the Bast-commits
mailing list