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

[release/6.0] Fix to #27356 - Collection_navigation_equal_to_null_for_subquery fails after merging from release/6.0 #27429

Merged
merged 1 commit into from
Mar 2, 2022
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 @@ -204,7 +204,8 @@ protected override Expression VisitBinary(BinaryExpression binaryExpression)
{
var projection = translatedSubquery.ShaperExpression;
if (projection is NewExpression
|| RemoveConvert(projection) is EntityShaperExpression { IsNullable: false })
|| RemoveConvert(projection) is EntityShaperExpression { IsNullable: false }
|| RemoveConvert(projection) is CollectionResultShaperExpression)
{
var anySubquery = Expression.Call(
QueryableMethods.AnyWithoutPredicate.MakeGenericMethod(translatedSubquery.Type.GetSequenceType()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ protected override Expression VisitBinary(BinaryExpression binaryExpression)
{
var projection = translatedSubquery.ShaperExpression;
if (projection is NewExpression
|| RemoveConvert(projection) is EntityShaperExpression { IsNullable: false })
|| RemoveConvert(projection) is EntityShaperExpression { IsNullable: false }
|| RemoveConvert(projection) is CollectionResultExpression)
{
var anySubquery = Expression.Call(
QueryableMethods.AnyWithoutPredicate.MakeGenericMethod(translatedSubquery.Type.GetSequenceType()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5546,7 +5546,7 @@ protected static bool ClientEvalPredicate(Order order)
protected internal uint ClientEvalSelector(Order order)
=> order.EmployeeID % 10 ?? 0;

[ConditionalTheory(Skip = "Issue#20445")]
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Collection_navigation_equal_to_null_for_subquery(bool async)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4589,11 +4589,10 @@ public override async Task Collection_navigation_equal_to_null_for_subquery(bool
AssertSql(
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
FROM [Customers] AS [c]
WHERE (
SELECT TOP(1) [o].[OrderID]
WHERE NOT (EXISTS (
SELECT 1
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID]) IS NULL");
WHERE [c].[CustomerID] = [o].[CustomerID]))");
}

public override async Task Dependent_to_principal_navigation_equal_to_null_for_subquery(bool async)
Expand Down