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

[5.8] Fix qualified UPDATED_AT timestamps #26997

Merged
merged 1 commit into from
Dec 31, 2018
Merged

[5.8] Fix qualified UPDATED_AT timestamps #26997

merged 1 commit into from
Dec 31, 2018

Conversation

staudenmeir
Copy link
Contributor

@staudenmeir staudenmeir commented Dec 30, 2018

#26031 qualified UPDATED_AT timestamps to fix ambiguity issues.

This doesn't work properly when the attributes already contain an updated_at value:

User::first()->update(['name' => 'foo']);

In this case, Builder::addUpdatedAtColumn() returns an array with two separate updated_at values:

array:3 [▼
  "users.updated_at" => "2018-12-30 16:01:40"
  "name" => "foo"
  "updated_at" => "2018-12-30 16:01:40"
]

We have to merge the attributes first and then qualify the column by replacing the array key.

Fixes #26995.

@taylorotwell taylorotwell merged commit a05eb4a into laravel:master Dec 31, 2018
@staudenmeir staudenmeir deleted the update-timestamp branch December 31, 2018 10:29
@rennokki
Copy link
Contributor

rennokki commented Mar 8, 2019

ETA for the next patch?

@mfn
Copy link
Contributor

mfn commented Mar 8, 2019

Hmm, what for? This went straight into 5.8 which is already released?

@rennokki
Copy link
Contributor

rennokki commented Mar 8, 2019

My bad. I feel so stupid for not seeing that the PR got published in December 2018. So the MongoDB issues should be fixed within the MongoDB package.

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

Successfully merging this pull request may close these issues.

5 participants