Skip to content

[5.6] Fix loadMissing() relationship parsing#24329

Merged
taylorotwell merged 1 commit into
laravel:5.6from
staudenmeir:load-missing
May 26, 2018
Merged

[5.6] Fix loadMissing() relationship parsing#24329
taylorotwell merged 1 commit into
laravel:5.6from
staudenmeir:load-missing

Conversation

@staudenmeir
Copy link
Copy Markdown
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
Copy Markdown
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