Subject: | nullify related has_many objects fails due to wrong condition |
As stated in the modules documentation, recursive_update should set the
corresponding foreign keys (belonging to the related row) to NULL when
updating has_many relations.
Unfortunately, this will never happen, because the condition is not
checked correctly.
If recursive_update can nullify the corresponding columns in the related
table, it sets
$if_not_submitted = 'nullify';
but later checks:
if($if_not_submitted eq 'set_to_null'){...}
Because of this little mistake, related objects are NEVER removed from
has_many-relations when using recursive_update.
Subject: | recursiveupdate_hasmany_nullify.patch |
405c405
< elsif ( $if_not_submitted eq 'set_to_null' ) {
---
> elsif ( $if_not_submitted eq 'nullify' ) {