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

Query: Re-enable test for #22896 #25795

Merged
merged 1 commit into from
Aug 31, 2021
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 @@ -4027,7 +4027,7 @@ public virtual Task Collection_FirstOrDefault_entity_reference_accesses_in_proje
}));
}

[ConditionalTheory(Skip = "issue #22896")]
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Collection_FirstOrDefault_entity_collection_accesses_in_projection(bool async)
{
Expand All @@ -4041,7 +4041,13 @@ public virtual Task Collection_FirstOrDefault_entity_collection_accesses_in_proj
Pushdown = l1.OneToMany_Optional1
.Where(x => x.Name == "L2 02")
.FirstOrDefault().OneToMany_Optional2.ToList()
}));
}),
elementSorter: e => e.Id,
elementAsserter: (e, a) =>
{
Assert.Equal(e.Id, a.Id);
AssertCollection(e.Pushdown, a.Pushdown);
});
}

[ConditionalTheory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3677,7 +3677,20 @@ public override async Task Collection_FirstOrDefault_entity_collection_accesses_
await base.Collection_FirstOrDefault_entity_collection_accesses_in_projection(async);

AssertSql(
@"");
@"SELECT [l].[Id], [t0].[Id], [l1].[Id], [l1].[Level2_Optional_Id], [l1].[Level2_Required_Id], [l1].[Name], [l1].[OneToMany_Optional_Inverse3Id], [l1].[OneToMany_Optional_Self_Inverse3Id], [l1].[OneToMany_Required_Inverse3Id], [l1].[OneToMany_Required_Self_Inverse3Id], [l1].[OneToOne_Optional_PK_Inverse3Id], [l1].[OneToOne_Optional_Self3Id], [t0].[c]
FROM [LevelOne] AS [l]
LEFT JOIN (
SELECT [t].[c], [t].[Id], [t].[OneToMany_Optional_Inverse2Id]
FROM (
SELECT 1 AS [c], [l0].[Id], [l0].[OneToMany_Optional_Inverse2Id], ROW_NUMBER() OVER(PARTITION BY [l0].[OneToMany_Optional_Inverse2Id] ORDER BY [l0].[Id]) AS [row]
FROM [LevelTwo] AS [l0]
WHERE [l0].[Name] = N'L2 02'
) AS [t]
WHERE [t].[row] <= 1
) AS [t0] ON [l].[Id] = [t0].[OneToMany_Optional_Inverse2Id]
LEFT JOIN [LevelThree] AS [l1] ON [t0].[Id] = [l1].[OneToMany_Optional_Inverse3Id]
WHERE [l].[Id] < 2
ORDER BY [l].[Id], [t0].[Id]");
}

public override async Task Multiple_collection_FirstOrDefault_followed_by_member_access_in_projection(bool async)
Expand Down