[Bast-commits] r6817 -
DBIx-Class/0.08/branches/search_related_prefetch/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sun Jun 28 09:04:26 GMT 2009
Author: ribasushi
Date: 2009-06-28 09:04:26 +0000 (Sun, 28 Jun 2009)
New Revision: 6817
Modified:
DBIx-Class/0.08/branches/search_related_prefetch/lib/DBIx/Class/ResultSet.pm
Log:
Minor omission
Modified: DBIx-Class/0.08/branches/search_related_prefetch/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/branches/search_related_prefetch/lib/DBIx/Class/ResultSet.pm 2009-06-28 08:35:11 UTC (rev 6816)
+++ DBIx-Class/0.08/branches/search_related_prefetch/lib/DBIx/Class/ResultSet.pm 2009-06-28 09:04:26 UTC (rev 6817)
@@ -2578,16 +2578,17 @@
# if $self already had a join/prefetch specified on it, the requested
# $rel might very well be already included. What we do in this case
# is effectively a no-op (except that we bump up the chain_depth on
- # the join in question
+ # the join in question so we could tell it *is* the search_related)
my $already_joined;
- for my $j (@requested_joins) {
+
+ # we consider the last one thus reverse
+ for my $j (reverse @requested_joins) {
if ($rel eq $j->[0]{-join_path}[-1]) {
$j->[0]{-relation_chain_depth}++;
$already_joined++;
last;
}
}
-
unless ($already_joined) {
push @$from, $source->_resolve_join($rel, $attrs->{alias}, $seen);
}
More information about the Bast-commits
mailing list