Skip to content

Commit 3be1286

Browse files
committed
Improve HasManyThrough.first tests
1 parent bed4f98 commit 3be1286

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/GRDBTests/AssociationHasManyThroughFirstSQLTests.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -443,15 +443,15 @@ class AssociationHasManyThroughFirstSQLTests: GRDBTestCase {
443443
WHERE ("child"."parentId" = "parent"."id") AND (1 + 1)
444444
LIMIT 1)
445445
""")
446-
// TODO: no need for "child2" in the subquery
447446
try assertMatchSQL(db, Parent().request(for: association), """
448447
SELECT "pet".*
449448
FROM "pet"
450449
JOIN "child" "child1" ON ("child1"."id" = "pet"."childId") AND (1)
451450
JOIN "toy" ON "toy"."childId" = "child1"."id"
452451
JOIN "child" "child2" ON "child2"."id" = (
453-
SELECT "child2"."id" FROM "child" "child2"
454-
WHERE ("child2"."id" = "pet"."childId") AND (1 + 1) AND ("child2"."parentId" = 1)
452+
SELECT "child"."id"
453+
FROM "child"
454+
WHERE ("child"."id" = "pet"."childId") AND (1 + 1) AND ("child"."parentId" = 1)
455455
LIMIT 1)
456456
LIMIT 1
457457
""")

0 commit comments

Comments
 (0)