Made discard_changes use ->result_source->resultset->find
Matt S Trout [Sat, 11 Feb 2006 17:04:44 +0000 (17:04 +0000)]
lib/DBIx/Class/PK.pm

index 4c8f106..23d2b3c 100644 (file)
@@ -41,7 +41,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(map { $self->$_ } $self->primary_columns);
+  my ($reload) = $self->result_source->resultset->find(map { $self->$_ } $self->primary_columns);
   unless ($reload) { # If we got deleted in the mean-time
     $self->in_storage(0);
     return $self;