diff --git a/src/EFCore/Query/Internal/EntityEqualityRewritingExpressionVisitor.cs b/src/EFCore/Query/Internal/EntityEqualityRewritingExpressionVisitor.cs index 5f50489fa7b..6606a28f279 100644 --- a/src/EFCore/Query/Internal/EntityEqualityRewritingExpressionVisitor.cs +++ b/src/EFCore/Query/Internal/EntityEqualityRewritingExpressionVisitor.cs @@ -1085,16 +1085,15 @@ public EntityReferenceExpression(Expression underlying, Dictionary new EntityReferenceExpression(newUnderlying, EntityType, _lastNavigation, DtoType, SubqueryTraversed); + => new EntityReferenceExpression(newUnderlying, EntityType, null, DtoType, SubqueryTraversed); protected override Expression VisitChildren(ExpressionVisitor visitor) => Update(visitor.Visit(Underlying)); diff --git a/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs index cd7fae99fa1..7433840c774 100644 --- a/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs @@ -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) {