@@ -770,13 +770,13 @@ public void StringConstant_WithMultipleSingleQuotes_ShouldBeParameterized()
770770
771771 #region Closure-capture Chain Parameterization Tests
772772
773- // Reproduces the EXACT closure shape generated by an async method with two levels
774- // of nested if-blocks that capture an outer-method local. Mirrors
775- // <c>BrokerPortfolioRepository.SearchAsync</c>: outer state-machine field
776- // (tenantId ), first if -block DC (referencing the state-machine), and a nested
777- // else-block DC (referencing the first DC). The lambda inside the inner block
778- // then reads tenantId through a 3-link chain: innerDC → outerDC → methodDC →
779- // tenantId. The compiler-generated tree shape is:
773+ // Reproduces the closure shape generated by an async method with two levels
774+ // of nested if-blocks that capture an outer-method local: outer
775+ // state-machine field (tenantId), first if-block DC (referencing the
776+ // state-machine ), and a nested else -block DC (referencing the first DC).
777+ // The lambda inside the inner block then reads tenantId through a 3-link
778+ // chain: innerDC → outerDC → methodDC → tenantId. The compiler-generated
779+ // tree shape is:
780780 // MemberAccess(tenantId)
781781 // MemberAccess(CS$<>8__locals1)
782782 // MemberAccess(CS$<>8__locals2)
@@ -962,11 +962,11 @@ public void Where_NavigationProperty_OrContainsFk_EmitsJoin()
962962 }
963963
964964 /// <summary>
965- /// Reproduction of the downstream Broker failure : an entity with
966- /// inheritance ( TestBrokerBase) carrying [RelationSingle] audit FKs
967- /// (CreatedBy/ModifiedBy → TestBrokerUser) plus another [RelationSingle]
968- /// User on the derived entity. Where-predicate on User.Email must emit
969- /// the INNER JOIN to TestBrokerUser , otherwise SQL Server reports
965+ /// Inheritance + RelationSingle interaction : an entity with
966+ /// <see cref=" TestBrokerBase"/> audit FKs (CreatedBy/ModifiedBy →
967+ /// <see cref=" TestBrokerUser"/> ) plus another [RelationSingle] User on
968+ /// the derived entity. Where-predicate on User.Email must emit the INNER
969+ /// JOIN, otherwise SQL Server reports
970970 /// "multi-part identifier 'User.Email' could not be bound".
971971 /// </summary>
972972 [ TestMethod ]
@@ -990,12 +990,12 @@ public void Where_BrokerPortfolio_NavigationToUserEmail_EmitsJoin()
990990 }
991991
992992 /// <summary>
993- /// Reproduction of the original Broker bug: SearchAsync built a single
994- /// Where with three OR'ed Like predicates over p.User.Email / FirstName /
995- /// LastName. ORM 1.0.29 translated this without the implicit JOIN, so
996- /// SQL Server failed with "multi-part identifier 'User.Email' could not
997- /// be bound". A single INNER JOIN must be emitted, and all three OR
998- /// branches must reference the joined alias .
993+ /// A single Where with three OR'ed Like predicates over the same
994+ /// navigation ( p.User.Email / FirstName / LastName) must emit a single
995+ /// INNER JOIN, and all three OR branches must reference the joined
996+ /// alias. Earlier the translator skipped the implicit JOIN and SQL
997+ /// Server failed with "multi-part identifier 'User.Email' could not be
998+ /// bound" .
999999 /// </summary>
10001000 [ TestMethod ]
10011001 public void Where_BrokerPortfolio_OrAcrossUserColumns_EmitsSingleJoin ( )
@@ -1017,8 +1017,7 @@ public void Where_BrokerPortfolio_OrAcrossUserColumns_EmitsSingleJoin()
10171017 sql . Contains ( "[Ecng_TestBrokerUser]" ) . AssertTrue (
10181018 $ "Expected join target [Ecng_TestBrokerUser], got: { sql } ") ;
10191019
1020- // All three branches must qualify columns with the joined alias —
1021- // the buggy translator emitted bare [Email]/[FirstName]/[LastName].
1020+ // All three branches must qualify columns with the joined alias.
10221021 sql . Contains ( "[User].[Email]" ) . AssertTrue (
10231022 $ "Expected qualified [User].[Email], got: { sql } ") ;
10241023 sql . Contains ( "[User].[FirstName]" ) . AssertTrue (
0 commit comments