-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dbal builder: rewrite WHERE condition for has-many rel into JOIN clau…
…se and use aggretaion in WHERE This commit changes how we handle has-many relationship query construciton. Until now, every has-many relationship was simply left-joined and filtered via where. The duplication was solved by group-by statement. From now on, the joined table is filtered already in the JOIN clause and the where-part is simply aggretation count of the joined table > 0. This allow moving the where clause to having clause, where it may be combined with other aggregation filtering condition.
- Loading branch information
Showing
3 changed files
with
131 additions
and
43 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
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