X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSet.pm;h=9fba9fc8c54f90d0a106b5fc02c4148501f50783;hb=daf4e3bed37d35feb43338142935dcb4c61313b8;hp=1308a00671840f660081e6928c0f2efd99b8547a;hpb=a2908180edad666e984bc983807bff3842f04e2e;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 1308a00..9fba9fc 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -2928,7 +2928,7 @@ sub _joinpath_aliases { for my $j (@$fromspec) { next if ref $j ne 'ARRAY'; - next if $j->[0]{-relation_chain_depth} < $cur_depth; + next if ($j->[0]{-relation_chain_depth} || 0) < $cur_depth; my $jpath = $j->[0]{-join_path}; @@ -3392,7 +3392,7 @@ may or may not be what you want. If you specify a condition on a prefetched relationship, ONLY those rows that match the prefetched condition will be fetched into that relationship. This means that adding prefetch to a search() B what is returned by -traversing a relationship. So, if you have Chas_many(CDs)> and you do +traversing a relationship. So, if you have C<< Artist->has_many(CDs) >> and you do my $artist_rs = $schema->resultset('Artist')->search({ 'cds.year' => 2008,