Skip to content

Commit

Permalink
Update project star table correctly while eliminating join
Browse files Browse the repository at this point in the history
  • Loading branch information
smitpatel committed May 15, 2017
1 parent 98d0194 commit 46fe6ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/EFCore.Relational/Query/RelationalQueryModelVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,9 @@ var newTableExpression

selectExpression.RemoveTable(joinExpressionBase);

if (ReferenceEquals(selectExpression.ProjectStarTable, joinExpressionBase)
|| ReferenceEquals(selectExpression.ProjectStarTable, joinExpressionBase.TableExpression))
if (ReferenceEquals(selectExpression.ProjectStarTable, joinExpressionBase))
{
selectExpression.ProjectStarTable = newTableExpression;
selectExpression.ProjectStarTable = selectExpression.GetTableForQuerySource(newTableExpression.QuerySource);
}

var sqlTableReferenceReplacingVisitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public ComplexNavigationsOwnedQuerySqlServerTest(
ComplexNavigationsOwnedQuerySqlServerFixture fixture, ITestOutputHelper testOutputHelper)
: base(fixture)
{
fixture.TestSqlLoggerFactory.Clear();
//fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
Fixture.TestSqlLoggerFactory.Clear();
//Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
}

// TODO: Assert SQL
Expand Down

0 comments on commit 46fe6ba

Please sign in to comment.