X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FPK.pm;h=f156b59519c3700f1ec5ca71f1292f2157e0e9d2;hb=741d6d0ecddc46df590f700f5270d1e287d4ab2b;hp=4d46421eb1b93f5d4945696f8a9a9790c20a6512;hpb=40dbc10813c6f5bd0a91a08b5e00d1027c390c0c;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/PK.pm b/lib/DBIx/Class/PK.pm index 4d46421..f156b59 100644 --- a/lib/DBIx/Class/PK.pm +++ b/lib/DBIx/Class/PK.pm @@ -96,7 +96,7 @@ sub discard_changes { my ($self) = @_; delete $self->{_dirty_columns}; return unless $self->in_storage; # Don't reload if we aren't real! - my ($reload) = $self->find($self->id); + my ($reload) = $self->find(map { $self->$_ } $self->primary_columns); unless ($reload) { # If we got deleted in the mean-time $self->in_storage(0); return $self;