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.5] Use table aliases when calling self-referencing HasManyThrough relation #21883

Merged
merged 3 commits into from
Nov 2, 2017
Merged

[5.5] Use table aliases when calling self-referencing HasManyThrough relation #21883

merged 3 commits into from
Nov 2, 2017

Conversation

JayBizzle
Copy link
Contributor

Up-to-date version of #21792. Fixes certain types of HasManyThrough relationship calls i.e. has() methods (User::has('teamMates')->get())

@themsaid So, what are we going to do about testing this? Shall i put a new test in here?

https://github.com/laravel/framework/blob/5.5/tests/Integration/Database/EloquentHasManyThroughTest.php

@themsaid
Copy link
Member

@JayBizzle thanks, I'll look into it in the morning :)

@themsaid
Copy link
Member

@JayBizzle pushed some changes so that we alias the table in the subquery like we do in the rest of relationships.

@JayBizzle
Copy link
Contributor Author

Cool, I'll test this out this evening just to make sure it covers our real world production scenario

@JayBizzle
Copy link
Contributor Author

Confirmed working in our production environment 👍

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