-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current `JoinQuery::addJoin()` method does not allow for a custom `Column`. Below is an example of the use case for this change: ```php $query = new Select(); $query ->setTable('company') ->setColumns([ 'company_id' => 'id', 'name' => 'name', ]) ->join( 'field_company_code', 'id', 'entity_id', ) ->join( 'company_codes', new Column('target_id', 'field_company_code'), new Column('id', 'company_codes'), ['code' => 'code'] ); ``` This query structure is common in Drupal when selecting values from fields on entities that reference other entities through the Field and Entity API.
- Loading branch information
1 parent
a941d33
commit 2c2b3ab
Showing
2 changed files
with
53 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters