From: David Kamholz Date: Wed, 12 Jul 2006 18:55:35 +0000 (+0000) Subject: fix from attr issue X-Git-Tag: v0.07002~75^2~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88a99be27ccb010fc1cbebab419518f41bdd294b;p=dbsrgits%2FDBIx-Class.git fix from attr issue --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 9b40f03..e8b36cb 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1505,9 +1505,11 @@ sub _resolved_attrs { ); } - push(@{$attrs->{from}}, - $source->resolve_join($join, $alias, { %{$attrs->{seen_join}||{}} }) - ); + $attrs->{from} = # have to copy here to avoid corrupting the original + [ + @{$attrs->{from}}, + $source->resolve_join($join, $alias, { %{$attrs->{seen_join}||{}} }) + ]; } $attrs->{group_by} ||= $attrs->{select} if delete $attrs->{distinct};