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.5] Use fill instead of forceFill while storing pivot attributes #21403

Merged
merged 1 commit into from Sep 26, 2017
Merged

[5.5] Use fill instead of forceFill while storing pivot attributes #21403

merged 1 commit into from Sep 26, 2017

Conversation

themsaid
Copy link
Member

This change allows CustomModels to control fillable attributes. By default all attributes are fillable in the Pivot built-in class.

@antonkomarev
Copy link
Contributor

antonkomarev commented Sep 26, 2017

You've got typo in the title: "Use FORCE instead ...".

@themsaid themsaid changed the title [5.5] Use force instead of forceFill while storing pivot attributes [5.5] Use fill instead of forceFill while storing pivot attributes Sep 26, 2017
@themsaid
Copy link
Member Author

@a-komarev haha, thanks :D

@antonkomarev
Copy link
Contributor

Use The Force, Luke!

@taylorotwell taylorotwell merged commit 8544c7b into laravel:5.5 Sep 26, 2017
@mpyw
Copy link
Contributor

mpyw commented Oct 19, 2017

@taylorotwell @themsaid When all extra attributes are not fillable, ORM runs broken SQL:

UPDATE table_name SET WHERE foo = 1 AND bar = 2

Then we get PDOException. Is this an expected behavior?


I'm organizing complicated relations so custom pivot table has the third foreign key. How can I fill it with syncWithoutDetaching()?

Should we have the option $forceFill = false?

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.

None yet

4 participants