Skip to content

Conversation

@marcoboers
Copy link
Contributor

@marcoboers marcoboers commented Jan 8, 2021

This fixes an issue with that the behavior of the updateOrCreate method on BelongsToMany relationships is not merging the $attributes and $values arrays.

This is different from the behaviour of the updateOrCreate methods on Builder, HasOneOrMany and HasManyThrough classes and from the documented behavior "If no such flight exists, a new flight will be created which has the attributes resulting from merging the first argument array with the second argument array" eloquent#upserts.

Fixes #35798

@driesvints
Copy link
Member

@marcoboers it's best that you give a detailed explanation in your PR description at what this fixes. Otherwise this PR will probably get closed.

@marcoboers
Copy link
Contributor Author

@driesvints Thanks, I have updated the description.

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