Attributes set in beforeSoftDelete will not be saved , $attributes should init from $this->owner ?
hellowingy opened this issue · 1 comments
hellowingy commented
protected function softDeleteInternal()
{
$result = false;
if ($this->beforeSoftDelete()) {
//$attributes = [];
**$attributes = $this->owner->getAttributes();**
foreach ($this->softDeleteAttributeValues as $attribute => $value) {
if (!is_scalar($value) && is_callable($value)) {
$value = call_user_func($value, $this->owner);
}
$attributes[$attribute] = $value;
}
$result = $this->owner->updateAttributes($attributes);
$this->afterSoftDelete();
}
return $result;
}
klimov-paul commented
Resolved by commit 8df3b9d