From: Daniel Westermann-Clark Date: Tue, 11 Apr 2006 06:06:26 +0000 (-0400) Subject: Nasty hack for CDBI lowercasing all columns. Ideallly this will be pushed down to... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eca4c979e289004ba79426102099e4c52fe9b5ec;p=dbsrgits%2FDBIx-Class-Historic.git Nasty hack for CDBI lowercasing all columns. Ideallly this will be pushed down to the CDBICompat layer, but I'm not sure how yet. --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 8d683e0..954daa3 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -314,9 +314,15 @@ sub find { my @unique_cols = @{ $unique_constraints{$name} }; my %unique_hash; if (ref $vals[0] eq 'HASH') { + # Stupid hack for CDBICompat + my %hash = %{ $vals[0] }; + foreach my $key (keys %hash) { + $hash{lc $key} = delete $hash{$key}; + } + %unique_hash = - map { $_ => $vals[0]->{$_} } - grep { exists $vals[0]->{$_} } + map { $_ => $hash{$_} } + grep { exists $hash{$_} } @unique_cols; } elsif (@unique_cols == @vals) {