X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FPK.pm;h=9bda5cac47b48bc5e57aa578c35a830a082159ca;hb=a2bd379666d729133d65c85dc775627937084b18;hp=e128e5743532dac3ea73fd7a54fb383aeca2264a;hpb=fb13a49f17a0e0a49638080a4bd826fb3702aebe;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/PK.pm b/lib/DBIx/Class/PK.pm index e128e57..9bda5ca 100644 --- a/lib/DBIx/Class/PK.pm +++ b/lib/DBIx/Class/PK.pm @@ -40,7 +40,7 @@ sub _ident_values { my (@ids, @missing); - for ($self->_pri_cols) { + for ($self->result_source->_pri_cols_or_die) { push @ids, ($use_storage_state and exists $self->{_column_data_in_storage}{$_}) ? $self->{_column_data_in_storage}{$_} : $self->get_column($_) @@ -87,7 +87,7 @@ sub ID { sub _create_ID { my ($self, %vals) = @_; - return undef unless 0 == grep { !defined } values %vals; + return undef if grep { !defined } values %vals; return join '|', ref $self || $self, $self->result_source->name, map { $_ . '=' . $vals{$_} } sort keys %vals; } @@ -113,7 +113,7 @@ sub _storage_ident_condition { sub _mk_ident_cond { my ($self, $alias, $use_storage_state) = @_; - my @pks = $self->_pri_cols; + my @pks = $self->result_source->_pri_cols_or_die; my @vals = $self->_ident_values($use_storage_state); my (%cond, @undef); @@ -134,15 +134,17 @@ sub _mk_ident_cond { return \%cond; } -1; - -=head1 AUTHOR AND CONTRIBUTORS +=head1 FURTHER QUESTIONS? -See L and L in DBIx::Class +Check the list of L. -=head1 LICENSE +=head1 COPYRIGHT AND LICENSE -You may distribute this code under the same terms as Perl itself. +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L. =cut +1;