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
22 changes: 9 additions & 13 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<EFCoreVersion>10.0.0-rc.2.25502.107</EFCoreVersion>
<MicrosoftExtensionsVersion>10.0.0-rc.2.25502.107</MicrosoftExtensionsVersion>
<EFCoreVersion>10.0.0</EFCoreVersion>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this property still used? I don't see it being used.

Suggested change
<EFCoreVersion>10.0.0</EFCoreVersion>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's not used right now - preparing for the GA build - since EFCore.PG 10 will depend on a range of versions ([10.0.0,11.0.0)). However, once we release and main represents EFCore.PG 11.0.0, I'll switch back to referencing a specific version of EF for the previews, since we want to lock EFCore.PG's previews to to EFCore's previews (previews might contain provider-facing breaking changes, and I want to guide/force users to align EFCore.PG/EFCore versions).

So this is a temporary situation.

<MicrosoftExtensionsVersion>10.0.0</MicrosoftExtensionsVersion>
<NpgsqlVersion>10.0.0-rc.2-ci.20251107T191940</NpgsqlVersion>
</PropertyGroup>

Expand All @@ -10,11 +10,11 @@
Dependencies on EF preview versions should be locked to a specific version (as provider-facing breaking changes are frequent).
For released versions, depend on anything in the current major version to allow users to update to higher patch versions.
-->
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="[$(EFCoreVersion)]" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="[$(EFCoreVersion)]" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Abstractions" Version="[$(EFCoreVersion)]" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational.Specification.Tests" Version="[$(EFCoreVersion)]" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="[$(EFCoreVersion)]" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="[10.0.0,11.0.0)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="[10.0.0,11.0.0)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Abstractions" Version="[10.0.0,11.0.0)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational.Specification.Tests" Version="[10.0.0,11.0.0)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="[10.0.0,11.0.0)" />

<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="$(MicrosoftExtensionsVersion)" />
Expand All @@ -26,15 +26,11 @@
<PackageVersion Include="Npgsql.DependencyInjection" Version="$(NpgsqlVersion)" />

<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.assert" Version="2.9.3" />
<PackageVersion Include="xunit.core" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />

<!-- Temporary workaround for https://github.com/advisories/GHSA-w3q9-fxm7-j8fq, remote for 10.0.0 GA -->
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.14.28" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.14.28" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational.Specification.Tests" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />

<!-- Temporary workaround for https://github.com/advisories/GHSA-w3q9-fxm7-j8fq, remote for 10.0.0 GA -->
<PackageReference Include="Microsoft.Build.Tasks.Core" />
<PackageReference Include="Microsoft.Build.Utilities.Core" />

<!-- Needed to override xunit dependencies from EFCore projects on versions which aren't available on nuget.org -->
<PackageReference Include="xunit.assert" />
<PackageReference Include="xunit.core" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ namespace Microsoft.EntityFrameworkCore.Query;

public class AdHocComplexTypeQueryNpgsqlTest(NonSharedFixture fixture) : AdHocComplexTypeQueryTestBase(fixture)
{
// Test is SQL Server-specific and being removed, https://github.com/dotnet/efcore/pull/37177
public override Task Complex_type_equality_with_non_default_type_mapping()
=> Task.CompletedTask;

public override async Task Complex_type_equals_parameter_with_nested_types_with_property_of_same_name()
{
await base.Complex_type_equals_parameter_with_nested_types_with_property_of_same_name();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,13 @@ public override async Task Nested_collection_with_parameter()

public override async Task Contains_with_inline()
{
// https://github.com/dotnet/efcore/issues/36837
await Assert.ThrowsAsync<PostgresException>(async () =>
{
await base.Contains_with_inline();

// TODO: The following translation is sub-optimal: we should be using OPENSJON to extract elements of the collection as JSON elements (OPENJSON WITH JSON),
// and comparison those elements to a single entire JSON fragment on the other side (just like non-collection JSON comparison), rather than breaking the
// elements down to their columns and doing column-by-column comparison. See #32576.
AssertSql(
"""
await base.Contains_with_inline();

// TODO: The following translation is sub-optimal: we should be using OPENSJON to extract elements of the collection as JSON elements (OPENJSON WITH JSON),
// and comparison those elements to a single entire JSON fragment on the other side (just like non-collection JSON comparison), rather than breaking the
// elements down to their columns and doing column-by-column comparison. See #32576.
AssertSql(
"""
SELECT r."Id", r."Name", r."AssociateCollection", r."OptionalAssociate", r."RequiredAssociate"
FROM "RootEntity" AS r
WHERE EXISTS (
Expand All @@ -173,21 +170,17 @@ FROM ROWS FROM (jsonb_to_recordset(r."RequiredAssociate" -> 'NestedCollection')
)) WITH ORDINALITY AS n
WHERE n."Id" = 1002 AND n."Int" = 8 AND n."Ints" = '[1,2,3]' AND n."Name" = 'Root1_RequiredAssociate_NestedCollection_1' AND n."String" = 'foo')
""");
});
}

public override async Task Contains_with_parameter()
{
// https://github.com/dotnet/efcore/issues/36837
await Assert.ThrowsAsync<PostgresException>(async () =>
{
await base.Contains_with_parameter();

// TODO: The following translation is sub-optimal: we should be using OPENSJON to extract elements of the collection as JSON elements (OPENJSON WITH JSON),
// and comparison those elements to a single entire JSON fragment on the other side (just like non-collection JSON comparison), rather than breaking the
// elements down to their columns and doing column-by-column comparison. See #32576.
AssertSql(
"""
await base.Contains_with_parameter();

// TODO: The following translation is sub-optimal: we should be using OPENSJON to extract elements of the collection as JSON elements (OPENJSON WITH JSON),
// and comparison those elements to a single entire JSON fragment on the other side (just like non-collection JSON comparison), rather than breaking the
// elements down to their columns and doing column-by-column comparison. See #32576.
AssertSql(
"""
@entity_equality_nested_Id='?' (DbType = Int32)
@entity_equality_nested_Int='?' (DbType = Int32)
@entity_equality_nested_Ints='?' (DbType = Object)
Expand All @@ -207,18 +200,14 @@ FROM ROWS FROM (jsonb_to_recordset(r."RequiredAssociate" -> 'NestedCollection')
)) WITH ORDINALITY AS n
WHERE n."Id" = @entity_equality_nested_Id AND n."Int" = @entity_equality_nested_Int AND n."Ints" = @entity_equality_nested_Ints AND n."Name" = @entity_equality_nested_Name AND n."String" = @entity_equality_nested_String)
""");
});
}

public override async Task Contains_with_operators_composed_on_the_collection()
{
// https://github.com/dotnet/efcore/issues/36837
await Assert.ThrowsAsync<PostgresException>(async () =>
{
await base.Contains_with_operators_composed_on_the_collection();
await base.Contains_with_operators_composed_on_the_collection();

AssertSql(
"""
AssertSql(
"""
@get_Item_Int='?' (DbType = Int32)
@entity_equality_get_Item_Id='?' (DbType = Int32)
@entity_equality_get_Item_Int='?' (DbType = Int32)
Expand All @@ -239,18 +228,14 @@ FROM ROWS FROM (jsonb_to_recordset(r."RequiredAssociate" -> 'NestedCollection')
)) WITH ORDINALITY AS n
WHERE n."Int" > @get_Item_Int AND n."Id" = @entity_equality_get_Item_Id AND n."Int" = @entity_equality_get_Item_Int AND n."Ints" = @entity_equality_get_Item_Ints AND n."Name" = @entity_equality_get_Item_Name AND n."String" = @entity_equality_get_Item_String)
""");
});
}

public override async Task Contains_with_nested_and_composed_operators()
{
// https://github.com/dotnet/efcore/issues/36837
await Assert.ThrowsAsync<PostgresException>(async () =>
{
await base.Contains_with_nested_and_composed_operators();
await base.Contains_with_nested_and_composed_operators();

AssertSql(
"""
AssertSql(
"""
@get_Item_Id='?' (DbType = Int32)
@entity_equality_get_Item_Id='?' (DbType = Int32)
@entity_equality_get_Item_Int='?' (DbType = Int32)
Expand All @@ -277,7 +262,6 @@ FROM ROWS FROM (jsonb_to_recordset(r."AssociateCollection") AS (
)) WITH ORDINALITY AS a
WHERE a."Id" > @get_Item_Id AND a."Id" = @entity_equality_get_Item_Id AND a."Int" = @entity_equality_get_Item_Int AND a."Ints" = @entity_equality_get_Item_Ints AND a."Name" = @entity_equality_get_Item_Name AND a."String" = @entity_equality_get_Item_String AND (a."NestedCollection") = @entity_equality_get_Item_NestedCollection AND (a."OptionalNestedAssociate") = @entity_equality_get_Item_OptionalNestedAssociate AND (a."RequiredNestedAssociate") = @entity_equality_get_Item_RequiredNestedAssociate)
""");
});
}

#endregion Contains
Expand Down
8 changes: 0 additions & 8 deletions test/EFCore.PG.Tests/EFCore.PG.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Npgsql.DependencyInjection" />

<!-- Temporary workaround for https://github.com/advisories/GHSA-w3q9-fxm7-j8fq, remote for 10.0.0 GA -->
<PackageReference Include="Microsoft.Build.Tasks.Core" />
<PackageReference Include="Microsoft.Build.Utilities.Core" />

<!-- Needed to override xunit dependencies from EFCore projects on versions which aren't available on nuget.org -->
<PackageReference Include="xunit.assert" />
<PackageReference Include="xunit.core" />
</ItemGroup>

</Project>