X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FPK.pm;h=9b9f8a4adbb334ee5fbade204b89dc2281931ab7;hb=93405cf016ed24f7a9859bfe6107cd94164a6d9b;hp=9895edb24c16c1ab3aa58d150efdc6656995412f;hpb=9b83fccd091065fcebbb6fb6fb7bf2c2da38ffe2;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/PK.pm b/lib/DBIx/Class/PK.pm index 9895edb..9b9f8a4 100644 --- a/lib/DBIx/Class/PK.pm +++ b/lib/DBIx/Class/PK.pm @@ -20,11 +20,6 @@ depending on them. =cut -sub _ident_cond { - my ($class) = @_; - return join(" AND ", map { "$_ = ?" } $class->primary_columns); -} - sub _ident_values { my ($self) = @_; return (map { $self->{_column_data}{$_} } $self->primary_columns); @@ -104,8 +99,8 @@ Produces a condition hash to locate a row based on the primary key(s). sub ident_condition { my ($self, $alias) = @_; my %cond; - $cond{(defined $alias ? "${alias}.$_" : $_)} = $self->get_column($_) - for $self->primary_columns; + my $prefix = defined $alias ? $alias.'.' : ''; + $cond{$prefix.$_} = $self->get_column($_) for $self->primary_columns; return \%cond; }