You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QueryRewrite: when comparing entity with composite key to null, only check it's first key property, rather than all of them #15080
fromg1ings
join g2ings on g1.HasSoulPatch equals true into groupingfromg2ingrouping.DefaultIfEmpty()
orderby g2.Nicknameselectg2!=null?new{g2.Nickname,Five=5}:null
Expected:
SELECT CASE
WHEN [t].[Nickname] IS NOT NULL
THEN CAST(1ASbit) ELSE CAST(0ASbit)
END, [t].[Nickname]
FROM [Gears] AS [g1]
LEFT JOIN (
SELECT [g2].*FROM [Gears] AS [g2]
WHERE [g2].[Discriminator] IN (N'Officer', N'Gear')
) AS [t] ON [g1].[HasSoulPatch] = CAST(1ASbit)
WHERE [g1].[Discriminator] IN (N'Officer', N'Gear')
ORDER BY [t].[Nickname]
current:
SELECT CASE
WHEN [t].[Nickname] IS NOT NULLOR [t].[SquadId] IS NOT NULL
THEN CAST(1ASbit) ELSE CAST(0ASbit)
END, [t].[Nickname]
FROM [Gears] AS [g1]
LEFT JOIN (
SELECT [g2].*FROM [Gears] AS [g2]
WHERE [g2].[Discriminator] IN (N'Officer', N'Gear')
) AS [t] ON [g1].[HasSoulPatch] = CAST(1ASbit)
WHERE [g1].[Discriminator] IN (N'Officer', N'Gear')
ORDER BY [t].[Nickname]");
Activity
ajcvickers commentedon Jun 27, 2019
@maumar What if one key value is null and the other is non-null? This should be treated as a null key, but the first property may not be null.
20 remaining items
Query: Rewrite Entity Equality during translation phase
Query: Rewrite Entity Equality during translation phase
Query: Check for all PK value for collection navigation expansion
Query: Check for all PK value for collection navigation expansion