Fix stupid oversight in update_all
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSet.pm
index 7f9174c..b12fca7 100644 (file)
@@ -1830,7 +1830,7 @@ sub update_all {
     unless ref $values eq 'HASH';
 
   my $guard = $self->result_source->schema->txn_scope_guard;
-  $_->update($values) for $self->all;
+  $_->update({%$values}) for $self->all;  # shallow copy - update will mangle it
   $guard->commit;
   return 1;
 }