From: Daniel Westermann-Clark Date: Tue, 18 Apr 2006 17:55:43 +0000 (-0400) Subject: Rename X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a7bf36a241a3fa7b15517058b060a683d8f60eb2;p=dbsrgits%2FDBIx-Class-Historic.git Rename --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index ccedbbf..7679e11 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -308,7 +308,7 @@ sub find { my $attrs = (@_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {}); # Parse out a hash from input - my @unique_cols = exists $attrs->{key} + my @cols = exists $attrs->{key} ? $self->result_source->unique_constraint_columns($attrs->{key}) : $self->result_source->primary_columns; @@ -316,8 +316,8 @@ sub find { if (ref $_[0] eq 'HASH') { %hash = %{ $_[0] }; } - elsif (@_ == @unique_cols) { - @hash{@unique_cols} = @_; + elsif (@_ == @cols) { + @hash{@cols} = @_; } else { # Hack for CDBI queries