From: Daniel Westermann-Clark Date: Sat, 27 May 2006 23:39:20 +0000 (+0000) Subject: Fix for extraneous warning in 65multipk X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8dc9c09f877e9719bef9470a5d376f0d5351786f;p=dbsrgits%2FDBIx-Class-Historic.git Fix for extraneous warning in 65multipk --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 89600ce..8e44f82 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -498,8 +498,11 @@ sub _is_unique_query { my %seen = map { $_ => 0 } @unique_cols; foreach my $key (keys %$collapsed) { - next unless exists $seen{$key}; # Additional constraints are okay - $seen{$key} = scalar @{ $collapsed->{$key} }; + my $aliased = $key; + $aliased = "$self->{attrs}->{alias}.$key" unless $key =~ /\./; + + next unless exists $seen{$aliased}; # Additional constraints are okay + $seen{$aliased} = scalar @{ $collapsed->{$key} }; } # If we get 0 or more than 1 value for a column, it's not necessarily unique