Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity equality: fix mis-identification as collection navigation #17447

Merged
merged 1 commit into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1085,16 +1085,15 @@ public EntityReferenceExpression(Expression underlying, Dictionary<string, Entit
}

public EntityReferenceExpression(Expression underlying, IEntityType entityType)
: this(underlying, entityType, null, false)
: this(underlying, entityType, subqueryTraversed: false)
{
}

private EntityReferenceExpression(
Expression underlying, IEntityType entityType, INavigation lastNavigation, bool subqueryTraversed)
Expression underlying, IEntityType entityType, bool subqueryTraversed)
{
Underlying = underlying;
EntityType = entityType;
_lastNavigation = lastNavigation;
SubqueryTraversed = subqueryTraversed;
}

Expand Down Expand Up @@ -1126,6 +1125,7 @@ public virtual Expression TraverseProperty(string propertyName, Expression desti
destinationExpression,
navigation.GetTargetType(),
navigation,
null,
SubqueryTraversed)
: destinationExpression;
}
Expand All @@ -1146,7 +1146,7 @@ public virtual Expression TraverseProperty(string propertyName, Expression desti
}

public EntityReferenceExpression Update(Expression newUnderlying)
=> new EntityReferenceExpression(newUnderlying, EntityType, _lastNavigation, DtoType, SubqueryTraversed);
=> new EntityReferenceExpression(newUnderlying, EntityType, null, DtoType, SubqueryTraversed);

protected override Expression VisitChildren(ExpressionVisitor visitor)
=> Update(visitor.Visit(Underlying));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4981,7 +4981,7 @@ public virtual void Include_inside_subquery()
}
}

[ConditionalTheory(Skip = "Issue #17229")]
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Select_optional_navigation_property_string_concat(bool isAsync)
{
Expand Down