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

Conversation

Projects
None yet
4 participants
@themsaid
Member

themsaid commented Sep 26, 2017

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

@antonkomarev

This comment has been minimized.

Show comment
Hide comment
@antonkomarev

antonkomarev Sep 26, 2017

Contributor

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

Contributor

antonkomarev commented Sep 26, 2017

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

@themsaid themsaid changed the title from [5.5] Use force instead of forceFill while storing pivot attributes to [5.5] Use fill instead of forceFill while storing pivot attributes Sep 26, 2017

@themsaid

This comment has been minimized.

Show comment
Hide comment
@themsaid

themsaid Sep 26, 2017

Member

@a-komarev haha, thanks :D

Member

themsaid commented Sep 26, 2017

@a-komarev haha, thanks :D

@antonkomarev

This comment has been minimized.

Show comment
Hide comment
@antonkomarev

antonkomarev Sep 26, 2017

Contributor

Use The Force, Luke!

Contributor

antonkomarev commented Sep 26, 2017

Use The Force, Luke!

@taylorotwell taylorotwell merged commit 8544c7b into laravel:5.5 Sep 26, 2017

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mpyw

This comment has been minimized.

Show comment
Hide comment
@mpyw

mpyw Oct 19, 2017

Contributor

@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?

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