This enables the column accessors to do additional work (for example with method modifiers)
{{ $NEXT }}
- Fixed search for related columns overwriting existing params in generate_column_parameters
+- Use column accessor for updating an existing object instead of passing the new values to update.
+ This enables the column accessors to do additional work (for example with method modifiers).
2.002001 2010-04-01 01:41:11 Europe/Berlin
{
$self->update_object_relation($c, $object, delete $params->{$key}, $key);
}
+ $object->$key($value);
}
- $object->update($params);
+ $object->update();
}
=method_protected update_object_relation
my $row = $object->find_related($relation, {} , {});
if ($row) {
- $row->update($related_params);
+ foreach my $key (keys %$related_params) {
+ my $value = $related_params->{$key};
+ $row->$key($value);
+ }
+ $row->update();
}
else {
$object->create_related($relation, $related_params);