Skip to content

[5.6] Add Nested Joins to Query Builder - #23059

Merged
taylorotwell merged 1 commit into
laravel:5.6from
dariusj18:5.6
Feb 8, 2018
Merged

[5.6] Add Nested Joins to Query Builder#23059
taylorotwell merged 1 commit into
laravel:5.6from
dariusj18:5.6

Conversation

@dariusj18

Copy link
Copy Markdown
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.

2 participants