From: Gerda Shank Date: Sun, 4 Apr 2010 19:33:22 +0000 (-0400) Subject: Merge branch 'master' of github.com:zby/DBIx--Class--ResultSet--RecursiveUpdate X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate;a=commitdiff_plain;h=122716e149778430ea35310a4d93144af4fd1559;hp=311dd083d47f66fb455316ddd0e9a85963a0733d Merge branch 'master' of github.com:zby/DBIx--Class--ResultSet--RecursiveUpdate --- diff --git a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm index 1af66cc..eeec84c 100644 --- a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm +++ b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm @@ -208,15 +208,17 @@ sub _update_relation { object => $object->$name ); } - else{ + else{ $sub_object = recursive_update( resultset => $related_result, updates => $sub_updates, resolved => $resolved ); } } elsif( ! ref $sub_updates ){ - $sub_object = $related_result->find( $sub_updates ); + $sub_object = $related_result->find( $sub_updates ) + unless (!$sub_updates && ($info->{attrs}{join_type} eq 'LEFT')); } - $object->set_from_related( $name, $sub_object ); + $object->set_from_related( $name, $sub_object ) + unless (!$sub_object && !$sub_updates && ($info->{attrs}{join_type} eq 'LEFT')); } }