Skip to content
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
1 change: 1 addition & 0 deletions azure-pipelines-internal-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ extends:
baseline:
baselineFile: $(Build.SourcesDirectory)\.config\guardian\.gdnbaselines
binskim:
preReleaseVersion: '4.3.1'
enabled: false
justificationForDisabling: 'NonProduction'
policheck:
Expand Down
2 changes: 1 addition & 1 deletion eng/common/core-templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Publishing-Internal
image: windows.vs2019.amd64
image: windows.vs2022.amd64
os: windows
steps:
- ${{ if eq(parameters.is1ESPipeline, '') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ stages:
${{ else }}:
${{ if eq(parameters.is1ESPipeline, true) }}:
name: NetCore1ESPool-Publishing-Internal
image: windows.vs2019.amd64
image: windows.vs2022.amd64
os: windows
${{ else }}:
name: NetCore1ESPool-Publishing-Internal
demands: ImageOverride -equals windows.vs2019.amd64
demands: ImageOverride -equals windows.vs2022.amd64
steps:
- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ steps:
is1ESPipeline: true

${{ each parameter in parameters }}:
${{ parameter.key }}: ${{ parameter.value }}
${{ parameter.key }}: ${{ parameter.value }}
2 changes: 1 addition & 1 deletion eng/common/templates/variables/pool-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
# pool:
# name: $(DncEngInternalBuildPool)
# demands: ImageOverride -equals windows.vs2019.amd64
# demands: ImageOverride -equals windows.vs2022.amd64
variables:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- template: /eng/common/templates-official/variables/pool-providers.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,18 @@ FROM root c
""");
}

public override async Task Subquery_over_primitive_collection_on_inheritance_derived_type()
{
await base.Subquery_over_primitive_collection_on_inheritance_derived_type();

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE ((c["$type"] = "SubType") AND (ARRAY_LENGTH(c["Ints"]) > 0))
""");
}

[ConditionalFact]
public virtual void Check_all_tests_overridden()
=> TestHelpers.AssertAllMethodsOverridden(GetType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,33 @@ private class Owned
public int Foo { get; set; }
}

[ConditionalFact] // #37478
public virtual async Task Subquery_over_primitive_collection_on_inheritance_derived_type()
{
var contextFactory = await InitializeAsync<TestContext>(
onModelCreating: mb =>
{
mb.Entity<BaseType>();
mb.Entity<SubType>();
});

await using var context = contextFactory.CreateContext();

_ = await context.Set<BaseType>()
.Where(x => ((SubType)x).Ints.Any())
.ToListAsync();
}

public abstract class BaseType
{
public int Id { get; set; }
}

public class SubType : BaseType
{
public required int[] Ints { get; set; }
}

/// <summary>
/// A utility that allows easy testing of querying out arbitrary element types from a primitive collection, provided two distinct
/// element values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,20 @@ WHERE [t].[Id] IN (@ints1, @ints2, @ints3, @ints4, @ints5, @ints6, @ints7, @ints
""");
}

public override async Task Subquery_over_primitive_collection_on_inheritance_derived_type()
{
await base.Subquery_over_primitive_collection_on_inheritance_derived_type();

AssertSql(
"""
SELECT [b].[Id], [b].[Discriminator], [b].[Ints]
FROM [BaseType] AS [b]
WHERE EXISTS (
SELECT 1
FROM OPENJSON([b].[Ints]) AS [i])
""");
}

[ConditionalFact]
public virtual async Task Same_parameter_with_different_type_mappings()
{
Expand Down
Loading