-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.6] Fix: soft-delete does not sync original #24400
Conversation
179b6fc
to
fcbdd50
Compare
I feel like we used to have the code this way and it got removed because of some other bug it causes? Did you search through the old PRs for soft deletes? |
|
… is updated something.
I have the little bit changed the calling syncOrigin method to as it in the 'save' method. |
This fix destroys |
@mlanin , sorry ;( |
I really don't understand this change. It causes the Since you can manually call
|
@edbentinck you can create PR for revert this. |
@TBlindaruk please revert, see also Taylors concern |
@edbentinck Thanks! |
The $updated = $query->update($columns);
if ($updated) {
foreach(array_keys($columns) as $column) {
$this->syncOriginalAttribute($column);
}
} |
Actually, it is resubmitted for #24399
When we run a soft delete, then actually the original array is not changed, and it causes a problem for restoring after the soft deleting in one model.
So the steps to reproduce the bug:
Expectations: model will be restored
Actual result: the model is soft deleted
I have added a test.