Skip to content
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

When updating with a qualified updated_at column, the current time is still persisted #41128

Closed
PiranhaGeorge opened this issue Feb 20, 2022 · 1 comment

Comments

@PiranhaGeorge
Copy link

  • Laravel Version: 8.64.0
  • PHP Version: 7.4
  • Database Driver & Version: MySQL 8.0.20

Description:

When the updated_at column is manually updated using a qualified column name, the current time is still persisted. If the column name is not qualified, it works as expected.

Steps To Reproduce:

This works:

MyModel::whereIn('my_model.id', $ids)->update(['updated_at' => $date]);

But this results in the updated_at column being set to the current time rather than the provided time:

MyModel::whereIn('my_model.id', $ids)->update(['my_model.updated_at' => $time]);
@driesvints
Copy link
Member

Gonna see how @rodrigopedra's PR goes. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants