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] Add Nested Joins to Query Builder #23059

Merged
merged 1 commit into from
Feb 8, 2018
Merged

Conversation

dariusj18
Copy link
Contributor

Sometimes left joined tables should only show up if they can join to another table. The following query is a basic example and was used in one of the tests.

SELECT "users"."id",
"contacts"."id",
"contact_types"."id"
FROM "users"
LEFT JOIN "contacts"
INNER JOIN "contact_types"
ON "contacts"."contact_type_id" = "contact_types"."id"
ON "users"."id" = "contacts"."id"

Add $nestedJoins vairable to compileJoins function
Add tests testJoinsWithNestedJoins, testJoinsWithMultipleNestedJoins, testJoinsWithNestedJoinWithAdvancedSubqueryCondition to DatabaseQueryBuilderTest
@tillkruss tillkruss changed the title Add Nested Joins to Query Builder [5.6] Add Nested Joins to Query Builder Feb 7, 2018
@taylorotwell taylorotwell merged commit 83c2ec7 into laravel:5.6 Feb 8, 2018
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.

None yet

2 participants