From: Peter Rabbitson Date: Sun, 27 Jan 2013 19:10:34 +0000 (+0100) Subject: Write correct odd (not even) relchain depth on primary joins X-Git-Tag: v0.08240~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7ddb46dbf77846e735fc491e04b0db4337fe5c0;p=dbsrgits%2FDBIx-Class.git Write correct odd (not even) relchain depth on primary joins --- diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 97c37eb..d33a74d 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -1600,7 +1600,7 @@ sub _resolve_join { first { $rel_info->{attrs}{accessor} eq $_ } (qw/single filter/) ), -alias => $as, - -relation_chain_depth => $seen->{-relation_chain_depth} || 0, + -relation_chain_depth => ( $seen->{-relation_chain_depth} || 0 ) + 1, }, scalar $self->_resolve_condition($rel_info->{cond}, $as, $alias, $join) ];