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.3] Properly handle filling JSON attributes on Models #16228

Merged
merged 2 commits into from
Nov 2, 2016
Merged

[5.3] Properly handle filling JSON attributes on Models #16228

merged 2 commits into from
Nov 2, 2016

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Nov 2, 2016

In reference to #16213

When we do:

$user = User::find(1)->update( ['meta->area' => 'new value'] );

The user object after the update will look like

    {
        meta : {area : 'old value'},
        meta->area : "new value"
    }

This PR fills the value of meta correctly and unsets the meta->area attribute, this will present correct output for the model after saving.

@taylorotwell taylorotwell merged commit 8426afc into laravel:5.3 Nov 2, 2016
@lukepolo
Copy link
Contributor

lukepolo commented Nov 2, 2016

Awesome thanks for tackling this.

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.

3 participants