From a25c44676bb3eeabf0e4172bf8f2db6da039fc0b Mon Sep 17 00:00:00 2001 From: Alexander Hartmaier Date: Sat, 23 Oct 2010 16:11:21 +0200 Subject: [PATCH] don't autovivify an id key in the updates hash --- lib/DBIx/Class/ResultSet/RecursiveUpdate.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm index c42f1b7..e9b56e4 100644 --- a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm +++ b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm @@ -56,8 +56,11 @@ sub recursive_update { if ( blessed($updates) && $updates->isa('DBIx::Class::Row') ) { return $updates; } - if ( $updates->{id} ) { + if ( exists $updates->{id} ) { + # warn "finding object by id " . $updates->{id} . "\n"; $object = $self->find( $updates->{id}, { key => 'primary' } ); + # warn "object not found by id\n" + # unless defined $object; } my %fixed_fields = map { $_ => 1 } @$fixed_fields -- 2.43.0