Skip to content

Commit

Permalink
Put parentheses around IS NULL for non-bool operands
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Nov 19, 2021
1 parent 3335a1a commit f5b3b5f
Show file tree
Hide file tree
Showing 49 changed files with 2,904 additions and 2,849 deletions.
15 changes: 3 additions & 12 deletions src/EFCore.Relational/Query/QuerySqlGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -789,18 +789,9 @@ protected virtual bool RequiresParentheses(SqlExpression outerExpression, SqlExp
case LikeExpression _:
return true;

case SqlUnaryExpression sqlUnaryExpression:
{
// Wrap IS (NOT) NULL operation when applied on bool column.
if ((sqlUnaryExpression.OperatorType == ExpressionType.Equal
|| sqlUnaryExpression.OperatorType == ExpressionType.NotEqual)
&& sqlUnaryExpression.Operand.Type == typeof(bool))
{
return true;
}

return false;
}
// Surround all IS (NOT) NULL with parentheses for now, because of operator precedence issues (i.e. x = y IS NULL)
case SqlUnaryExpression { OperatorType: ExpressionType.Equal or ExpressionType.NotEqual }:
return true;

case SqlBinaryExpression sqlBinaryExpression:
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,24 @@ await AssertQuery(
ss => ss.Set<NullSemanticsEntity1>().Where(e => e.BoolB != e.NullableBoolA.HasValue));
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual async Task Bool_not_equal_nullable_int_HasValue(bool async)
{
await AssertQuery(
async,
ss => ss.Set<NullSemanticsEntity1>().Where(e => true != e.NullableIntA.HasValue));

var prm = false;
await AssertQuery(
async,
ss => ss.Set<NullSemanticsEntity1>().Where(e => prm != e.NullableIntA.HasValue));

await AssertQuery(
async,
ss => ss.Set<NullSemanticsEntity1>().Where(e => e.BoolB != e.NullableIntA.HasValue));
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual async Task Bool_not_equal_nullable_bool_compared_to_null(bool async)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public override async Task FromSqlRaw_composed_with_nullable_predicate(bool asyn
FROM (
SELECT * FROM ""Customers""
) AS [m]
WHERE ([m].[ContactName] = [m].[CompanyName]) OR ([m].[ContactName] IS NULL AND [m].[CompanyName] IS NULL)");
WHERE ([m].[ContactName] = [m].[CompanyName]) OR (([m].[ContactName] IS NULL) AND ([m].[CompanyName] IS NULL))");
}

public override async Task FromSqlRaw_with_dbParameter(bool async)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ FROM [BaseEntities] AS [b]
LEFT JOIN [BaseReferencesOnBase] AS [b0] ON [b].[Id] = [b0].[BaseParentId]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [b].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b2] ON [b].[Id] = [b2].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[Id], [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b2].[DerivedInheritanceRelationshipEntityId]");
}

Expand All @@ -104,7 +104,7 @@ FROM [BaseReferencesOnBase] AS [b]
LEFT JOIN [BaseEntities] AS [b0] ON [b].[BaseParentId] = [b0].[Id]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [b0].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b2] ON [b0].[Id] = [b2].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[Id], [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b2].[DerivedInheritanceRelationshipEntityId]");
}

Expand Down Expand Up @@ -144,7 +144,7 @@ FROM [BaseEntities] AS [b]
LEFT JOIN [ReferencesOnBase] AS [r] ON [b].[Id] = [r].[ParentId]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b1] ON [b].[Id] = [b1].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [r].[Id], [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b1].[DerivedInheritanceRelationshipEntityId]");
}

Expand All @@ -158,7 +158,7 @@ FROM [ReferencesOnBase] AS [r]
LEFT JOIN [BaseEntities] AS [b] ON [r].[ParentId] = [b].[Id]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b1] ON [b].[Id] = [b1].[DerivedInheritanceRelationshipEntityId]
WHERE ([r].[Name] <> N'Bar') OR [r].[Name] IS NULL
WHERE ([r].[Name] <> N'Bar') OR ([r].[Name] IS NULL)
ORDER BY [r].[Id], [b].[Id], [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b1].[DerivedInheritanceRelationshipEntityId]");
}

Expand Down Expand Up @@ -198,7 +198,7 @@ FROM [BaseEntities] AS [b]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b1] ON [b].[Id] = [b1].[DerivedInheritanceRelationshipEntityId]
LEFT JOIN [BaseCollectionsOnBase] AS [b2] ON [b].[Id] = [b2].[BaseParentId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b1].[DerivedInheritanceRelationshipEntityId], [b1].[Id]");
}

Expand All @@ -212,7 +212,7 @@ FROM [BaseCollectionsOnBase] AS [b]
LEFT JOIN [BaseEntities] AS [b0] ON [b].[BaseParentId] = [b0].[Id]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [b0].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b2] ON [b0].[Id] = [b2].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[Id], [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b2].[DerivedInheritanceRelationshipEntityId]");
}

Expand Down Expand Up @@ -252,7 +252,7 @@ FROM [BaseEntities] AS [b]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b1] ON [b].[Id] = [b1].[DerivedInheritanceRelationshipEntityId]
LEFT JOIN [CollectionsOnBase] AS [c] ON [b].[Id] = [c].[ParentId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b1].[DerivedInheritanceRelationshipEntityId], [b1].[Id]");
}

Expand All @@ -266,7 +266,7 @@ FROM [CollectionsOnBase] AS [c]
LEFT JOIN [BaseEntities] AS [b] ON [c].[ParentId] = [b].[Id]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b1] ON [b].[Id] = [b1].[DerivedInheritanceRelationshipEntityId]
WHERE ([c].[Name] <> N'Bar') OR [c].[Name] IS NULL
WHERE ([c].[Name] <> N'Bar') OR ([c].[Name] IS NULL)
ORDER BY [c].[Id], [b].[Id], [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b1].[DerivedInheritanceRelationshipEntityId]");
}

Expand Down Expand Up @@ -343,7 +343,7 @@ FROM [BaseEntities] AS [b]
LEFT JOIN [BaseReferencesOnBase] AS [b0] ON [b].[Id] = [b0].[BaseParentId]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [b].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b2] ON [b].[Id] = [b2].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Discriminator] = N'DerivedInheritanceRelationshipEntity') AND (([b].[Name] <> N'Bar') OR [b].[Name] IS NULL)
WHERE ([b].[Discriminator] = N'DerivedInheritanceRelationshipEntity') AND (([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL))
ORDER BY [b].[Id], [b0].[Id], [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b2].[DerivedInheritanceRelationshipEntityId]");
}

Expand All @@ -357,7 +357,7 @@ FROM [BaseEntities] AS [b]
LEFT JOIN [BaseReferencesOnDerived] AS [b0] ON [b].[Id] = [b0].[BaseParentId]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [b].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b2] ON [b].[Id] = [b2].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Discriminator] = N'DerivedInheritanceRelationshipEntity') AND (([b].[Name] <> N'Bar') OR [b].[Name] IS NULL)
WHERE ([b].[Discriminator] = N'DerivedInheritanceRelationshipEntity') AND (([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL))
ORDER BY [b].[Id], [b0].[Id], [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b2].[DerivedInheritanceRelationshipEntityId]");
}

Expand All @@ -375,7 +375,7 @@ FROM [BaseReferencesOnDerived] AS [b0]
) AS [t] ON [b].[Id] = [t].[DerivedInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [b].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b2] ON [b].[Id] = [b2].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Discriminator] = N'DerivedInheritanceRelationshipEntity') AND (([b].[Name] <> N'Bar') OR [b].[Name] IS NULL)
WHERE ([b].[Discriminator] = N'DerivedInheritanceRelationshipEntity') AND (([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL))
ORDER BY [b].[Id], [t].[Id], [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b2].[DerivedInheritanceRelationshipEntityId]");
}

Expand All @@ -393,7 +393,7 @@ FROM [BaseEntities] AS [b0]
) AS [t] ON [b].[BaseParentId] = [t].[Id]
LEFT JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [t].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
LEFT JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b2] ON [t].[Id] = [b2].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [t].[Id], [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b2].[DerivedInheritanceRelationshipEntityId]");
}

Expand Down Expand Up @@ -752,25 +752,25 @@ public override async Task Include_collection_with_inheritance_with_filter_split
AssertSql(
@"SELECT [b].[Id], [b].[Discriminator], [b].[Name], [b].[BaseId], [b].[OwnedReferenceOnBase_Id], [b].[OwnedReferenceOnBase_Name], [b].[OwnedReferenceOnDerived_Id], [b].[OwnedReferenceOnDerived_Name]
FROM [BaseEntities] AS [b]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]",
//
@"SELECT [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b0].[Name], [b].[Id]
FROM [BaseEntities] AS [b]
INNER JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]",
//
@"SELECT [b0].[DerivedInheritanceRelationshipEntityId], [b0].[Id], [b0].[Name], [b].[Id]
FROM [BaseEntities] AS [b]
INNER JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b0] ON [b].[Id] = [b0].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]",
//
@"SELECT [b0].[Id], [b0].[BaseParentId], [b0].[Discriminator], [b0].[Name], [b0].[DerivedProperty], [b].[Id]
FROM [BaseEntities] AS [b]
INNER JOIN [BaseCollectionsOnBase] AS [b0] ON [b].[Id] = [b0].[BaseParentId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]");
}

Expand All @@ -782,21 +782,21 @@ public override async Task Include_collection_with_inheritance_with_filter_rever
@"SELECT [b].[Id], [b].[BaseParentId], [b].[Discriminator], [b].[Name], [b].[DerivedProperty], [b0].[Id], [b0].[Discriminator], [b0].[Name], [b0].[BaseId], [b0].[OwnedReferenceOnBase_Id], [b0].[OwnedReferenceOnBase_Name], [b0].[OwnedReferenceOnDerived_Id], [b0].[OwnedReferenceOnDerived_Name]
FROM [BaseCollectionsOnBase] AS [b]
LEFT JOIN [BaseEntities] AS [b0] ON [b].[BaseParentId] = [b0].[Id]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[Id]",
//
@"SELECT [b1].[BaseInheritanceRelationshipEntityId], [b1].[Id], [b1].[Name], [b].[Id], [b0].[Id]
FROM [BaseCollectionsOnBase] AS [b]
LEFT JOIN [BaseEntities] AS [b0] ON [b].[BaseParentId] = [b0].[Id]
INNER JOIN [BaseEntities_OwnedCollectionOnBase] AS [b1] ON [b0].[Id] = [b1].[BaseInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[Id]",
//
@"SELECT [b1].[DerivedInheritanceRelationshipEntityId], [b1].[Id], [b1].[Name], [b].[Id], [b0].[Id]
FROM [BaseCollectionsOnBase] AS [b]
LEFT JOIN [BaseEntities] AS [b0] ON [b].[BaseParentId] = [b0].[Id]
INNER JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b1] ON [b0].[Id] = [b1].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id], [b0].[Id]");
}

Expand Down Expand Up @@ -855,25 +855,25 @@ public override async Task Include_collection_without_inheritance_with_filter_sp
AssertSql(
@"SELECT [b].[Id], [b].[Discriminator], [b].[Name], [b].[BaseId], [b].[OwnedReferenceOnBase_Id], [b].[OwnedReferenceOnBase_Name], [b].[OwnedReferenceOnDerived_Id], [b].[OwnedReferenceOnDerived_Name]
FROM [BaseEntities] AS [b]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]",
//
@"SELECT [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b0].[Name], [b].[Id]
FROM [BaseEntities] AS [b]
INNER JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]",
//
@"SELECT [b0].[DerivedInheritanceRelationshipEntityId], [b0].[Id], [b0].[Name], [b].[Id]
FROM [BaseEntities] AS [b]
INNER JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b0] ON [b].[Id] = [b0].[DerivedInheritanceRelationshipEntityId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]",
//
@"SELECT [c].[Id], [c].[Name], [c].[ParentId], [b].[Id]
FROM [BaseEntities] AS [b]
INNER JOIN [CollectionsOnBase] AS [c] ON [b].[Id] = [c].[ParentId]
WHERE ([b].[Name] <> N'Bar') OR [b].[Name] IS NULL
WHERE ([b].[Name] <> N'Bar') OR ([b].[Name] IS NULL)
ORDER BY [b].[Id]");
}

Expand All @@ -885,21 +885,21 @@ public override async Task Include_collection_without_inheritance_with_filter_re
@"SELECT [c].[Id], [c].[Name], [c].[ParentId], [b].[Id], [b].[Discriminator], [b].[Name], [b].[BaseId], [b].[OwnedReferenceOnBase_Id], [b].[OwnedReferenceOnBase_Name], [b].[OwnedReferenceOnDerived_Id], [b].[OwnedReferenceOnDerived_Name]
FROM [CollectionsOnBase] AS [c]
LEFT JOIN [BaseEntities] AS [b] ON [c].[ParentId] = [b].[Id]
WHERE ([c].[Name] <> N'Bar') OR [c].[Name] IS NULL
WHERE ([c].[Name] <> N'Bar') OR ([c].[Name] IS NULL)
ORDER BY [c].[Id], [b].[Id]",
//
@"SELECT [b0].[BaseInheritanceRelationshipEntityId], [b0].[Id], [b0].[Name], [c].[Id], [b].[Id]
FROM [CollectionsOnBase] AS [c]
LEFT JOIN [BaseEntities] AS [b] ON [c].[ParentId] = [b].[Id]
INNER JOIN [BaseEntities_OwnedCollectionOnBase] AS [b0] ON [b].[Id] = [b0].[BaseInheritanceRelationshipEntityId]
WHERE ([c].[Name] <> N'Bar') OR [c].[Name] IS NULL
WHERE ([c].[Name] <> N'Bar') OR ([c].[Name] IS NULL)
ORDER BY [c].[Id], [b].[Id]",
//
@"SELECT [b0].[DerivedInheritanceRelationshipEntityId], [b0].[Id], [b0].[Name], [c].[Id], [b].[Id]
FROM [CollectionsOnBase] AS [c]
LEFT JOIN [BaseEntities] AS [b] ON [c].[ParentId] = [b].[Id]
INNER JOIN [BaseEntities_OwnedCollectionOnDerived] AS [b0] ON [b].[Id] = [b0].[DerivedInheritanceRelationshipEntityId]
WHERE ([c].[Name] <> N'Bar') OR [c].[Name] IS NULL
WHERE ([c].[Name] <> N'Bar') OR ([c].[Name] IS NULL)
ORDER BY [c].[Id], [b].[Id]");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ INNER JOIN (
FROM [EntityRoots] AS [e0]
WHERE [e0].[Discriminator] IN (N'EntityBranch', N'EntityLeaf')
) AS [t] ON [j].[EntityBranchId] = [t].[Id]
WHERE ([e].[Id] = [j].[EntityOneId]) AND ([t].[Name] IS NOT NULL AND ([t].[Name] LIKE N'L%'))), [e].[Id]");
WHERE ([e].[Id] = [j].[EntityOneId]) AND (([t].[Name] IS NOT NULL) AND ([t].[Name] LIKE N'L%'))), [e].[Id]");
}

public override async Task Skip_navigation_long_count_without_predicate(bool async)
Expand Down Expand Up @@ -132,7 +132,7 @@ ORDER BY (
SELECT COUNT_BIG(*)
FROM [EntityTwoEntityTwo] AS [e0]
INNER JOIN [EntityTwos] AS [e1] ON [e0].[SelfSkipSharedLeftId] = [e1].[Id]
WHERE ([e].[Id] = [e0].[SelfSkipSharedRightId]) AND ([e1].[Name] IS NOT NULL AND ([e1].[Name] LIKE N'L%'))) DESC, [e].[Id]");
WHERE ([e].[Id] = [e0].[SelfSkipSharedRightId]) AND (([e1].[Name] IS NOT NULL) AND ([e1].[Name] LIKE N'L%'))) DESC, [e].[Id]");
}

public override async Task Skip_navigation_select_many_average(bool async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ INNER JOIN (
FROM [EntityRoots] AS [e0]
WHERE [e0].[Discriminator] IN (N'EntityBranch', N'EntityLeaf')
) AS [t] ON [j].[EntityBranchId] = [t].[Id]
WHERE ([e].[Id] = [j].[EntityOneId]) AND ([t].[Name] IS NOT NULL AND ([t].[Name] LIKE N'L%'))), [e].[Id]");
WHERE ([e].[Id] = [j].[EntityOneId]) AND (([t].[Name] IS NOT NULL) AND ([t].[Name] LIKE N'L%'))), [e].[Id]");
}

public override async Task Skip_navigation_long_count_without_predicate(bool async)
Expand Down Expand Up @@ -131,7 +131,7 @@ ORDER BY (
SELECT COUNT_BIG(*)
FROM [EntityTwoEntityTwo] AS [e0]
INNER JOIN [EntityTwos] AS [e1] ON [e0].[SelfSkipSharedLeftId] = [e1].[Id]
WHERE ([e].[Id] = [e0].[SelfSkipSharedRightId]) AND ([e1].[Name] IS NOT NULL AND ([e1].[Name] LIKE N'L%'))) DESC, [e].[Id]");
WHERE ([e].[Id] = [e0].[SelfSkipSharedRightId]) AND (([e1].[Name] IS NOT NULL) AND ([e1].[Name] LIKE N'L%'))) DESC, [e].[Id]");
}

public override async Task Skip_navigation_select_many_average(bool async)
Expand Down
Loading

0 comments on commit f5b3b5f

Please sign in to comment.