-
-
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.
Merge pull request #698 from nextras/fix-lifting
Fix having lifting required by row aggregator
- Loading branch information
Showing
8 changed files
with
115 additions
and
5 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
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
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
61 changes: 61 additions & 0 deletions
61
...Orm/Integration/Collection/CollectionAggregationTest_testRowAggregatorImposingLifting.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
SELECT | ||
"books".* | ||
FROM | ||
"books" AS "books" | ||
LEFT JOIN "books_x_tags" AS "books_x_tags_none" ON ( | ||
"books"."id" = "books_x_tags_none"."book_id" | ||
) | ||
LEFT JOIN "tags" AS "tags_none" ON ( | ||
( | ||
"books_x_tags_none"."tag_id" = "tags_none"."id" | ||
) | ||
AND "tags_none"."id" = 2 | ||
) | ||
GROUP BY | ||
"books"."title", | ||
"books"."id" | ||
HAVING | ||
("books"."title" = 'Book 1') | ||
OR ( | ||
COUNT("tags_none"."id") = 0 | ||
); | ||
|
||
SELECT | ||
"books".* | ||
FROM | ||
"books" AS "books" | ||
LEFT JOIN "books_x_tags" AS "books_x_tags_none" ON ( | ||
"books"."id" = "books_x_tags_none"."book_id" | ||
) | ||
LEFT JOIN "tags" AS "tags_none" ON ( | ||
( | ||
"books_x_tags_none"."tag_id" = "tags_none"."id" | ||
) | ||
AND "tags_none"."id" = 2 | ||
) | ||
WHERE | ||
"books"."title" = 'Book 1' | ||
GROUP BY | ||
"books"."id" | ||
HAVING | ||
COUNT("tags_none"."id") = 0; | ||
|
||
SELECT | ||
"books".* | ||
FROM | ||
"books" AS "books" | ||
LEFT JOIN "books_x_tags" AS "books_x_tags_none" ON ( | ||
"books"."id" = "books_x_tags_none"."book_id" | ||
) | ||
LEFT JOIN "tags" AS "tags_none" ON ( | ||
( | ||
"books_x_tags_none"."tag_id" = "tags_none"."id" | ||
) | ||
AND "tags_none"."id" = 3 | ||
) | ||
WHERE | ||
"books"."title" = 'Book 1' | ||
GROUP BY | ||
"books"."id" | ||
HAVING | ||
COUNT("tags_none"."id") = 0; |