         struct A: TableRecord {
             static let b = belongsTo(B.self)
             static let c = hasOne(B.c, through: b)
-            static let d1 = hasOne(C.d, through: c)
-            static let d2 = hasOne(B.d, through: b)
+            static let dThroughC = hasOne(C.d, through: c)
+            static let dThroughB = hasOne(B.d, through: b)
         }
         struct B: TableRecord {
             static let c = hasOne(C.self)

                t.column("bId").references("b")
            }
            
            do {
                for request in [
                    A.including(optional: A.d1),
                    A.including(optional: A.d2)]
                {
                    try assertEqualSQL(db, request, """
                        SELECT "a".*, "d".* \
                        FROM "a" \
                        LEFT JOIN "b" ON ("b"."id" = "a"."bId") \
                        LEFT JOIN "c" ON ("c"."bId" = "b"."id") \
                        LEFT JOIN "d" ON ("d"."id" = "c"."dId")
                        """)
                }
                for request in [
                    A.including(required: A.d1),
                    A.including(required: A.d2)]
                {
                    try assertEqualSQL(db, request, """
                        SELECT "a".*, "d".* \
                        FROM "a" \
                        JOIN "b" ON ("b"."id" = "a"."bId") \
                        JOIN "c" ON ("c"."bId" = "b"."id") \
                        JOIN "d" ON ("d"."id" = "c"."dId")
                        """)
                }
                for request in [
                    A.joining(optional: A.d1),
                    A.joining(optional: A.d2)]
                {
                    try assertEqualSQL(db, request, """
                        SELECT "a".* \
                        FROM "a" \
                        LEFT JOIN "b" ON ("b"."id" = "a"."bId") \
                        LEFT JOIN "c" ON ("c"."bId" = "b"."id") \
                        LEFT JOIN "d" ON ("d"."id" = "c"."dId")
                        """)
                }
                for request in [
                    A.joining(required: A.d1),
                    A.joining(required: A.d2)]
                {
                    try assertEqualSQL(db, request, """
                        SELECT "a".* \
                        FROM "a" \
                        JOIN "b" ON ("b"."id" = "a"."bId") \
                        JOIN "c" ON ("c"."bId" = "b"."id") \
                        JOIN "d" ON ("d"."id" = "c"."dId")
                        """)
                }
            }
        }
    }
    

                t.column("aId").references("a")
            }
            
            try testHasOneWithTwoSteps(
                db, ab: A.b, ac: A.c,
                bCondition: "(\"b\".\"aId\" = \"a\".\"id\")",
                cCondition: "(\"c\".\"id\" = \"b\".\"cId\")")
        }
    }
    
