Skip to content

[6.x] Fix firstWhere behavior for relations#32525

Merged
taylorotwell merged 1 commit into
6.xfrom
fix-first-where
Apr 24, 2020
Merged

[6.x] Fix firstWhere behavior for relations#32525
taylorotwell merged 1 commit into
6.xfrom
fix-first-where

Conversation

@driesvints
Copy link
Copy Markdown
Member

This PR fixes the firstWhere behavior for BelongsToMany relations and HasManyThrough. Previous behavior caused attributes from the pivot table to also be placed on the retrieved model and subsequently overwrite attributes.

Fixes #32464

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.

firstWhere merges pivot attributes with model on belongsToMany relation

2 participants