You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BelongsToMany::touch() does not call Model::isIgnoringTouch() to check if the models should be touched, so Model::withoutTouching() is not working for Many-To-Many relations.
Steps To Reproduce
Create two Models with Many-To-Many relation
Add $touches variable to the models and add the other model
Update one model by Model::withoutTouching(fn() => $model1->update(['column' => '::newVallue::']))
Check that both updated_at columns got updated
The text was updated successfully, but these errors were encountered:
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Laravel Version
10.41.0
PHP Version
8.1.27
Database Driver & Version
No response
Description
BelongsToMany::touch()
does not callModel::isIgnoringTouch()
to check if the models should be touched, soModel::withoutTouching()
is not working for Many-To-Many relations.Steps To Reproduce
Model::withoutTouching(fn() => $model1->update(['column' => '::newVallue::']))
The text was updated successfully, but these errors were encountered: