-
Notifications
You must be signed in to change notification settings - Fork 11k
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
touch has no effect on eloquent update method #16621
Comments
What are you expecting to happen, what is happening? |
It will only work when the following check is failing
So the code looks good, but somehow it's still updating the timestamps of your model. Am I right? |
@bobbybouwmann yeah, setting touch to false should make it avoid updating updated_at column |
Can you put a |
@lagbox it includes |
in |
That timestamp is already set before it gets to that update call. That So why the earlier block is calling |
@lagbox that's the issue, the query builder adds |
Nice work :) .. Could you try this |
Setting |
You can still call |
I can reproduce this behaviour if I use this translation package and make no updates on the main table; only on the translation table. |
$user->update(['field' => 'value'], ['touch' => false])
The text was updated successfully, but these errors were encountered: