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.6] Fix loadMissing() relationship parsing #24329

Merged
merged 1 commit into from
May 26, 2018
Merged

[5.6] Fix loadMissing() relationship parsing #24329

merged 1 commit into from
May 26, 2018

Conversation

staudenmeir
Copy link
Contributor

@staudenmeir staudenmeir commented May 25, 2018

loadMissing() currently parses nested relationships in a way that supports specifc columns in all levels:

$posts->loadMissing('comments.parent:id.revisions');

However, this is different from the way load() and with() parse relationships. They only support specific columns in the last relationship. This is necessary to allow columns with table names (#24166 (comment)):

$posts->loadMissing('comments.parent.revisions:revisions.comment_id');

This PR adjusts the parsing to match load() and with().

@taylorotwell taylorotwell merged commit 766c862 into laravel:5.6 May 26, 2018
@staudenmeir staudenmeir deleted the load-missing branch May 27, 2018 17:41
@phh
Copy link
Contributor

phh commented Jan 3, 2019

Seems like there is a problem when using relations of the same name like ingredients.unit.unit.association #27039

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