Skip to content

Commit fb48afb

Browse files
committed
Bump version to 7.0.3
1 parent dbb82d7 commit fb48afb

8 files changed

+105
-8
lines changed

Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<ImplicitUsings>true</ImplicitUsings>
1212
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1313

14-
<Copyright>Copyright 2022 © The Npgsql Development Team</Copyright>
14+
<Copyright>Copyright 2023 © The Npgsql Development Team</Copyright>
1515
<Company>Npgsql</Company>
16-
<VersionPrefix>7.0.2</VersionPrefix>
16+
<VersionPrefix>7.0.3</VersionPrefix>
1717
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1818
<PackageLicenseExpression>PostgreSQL</PackageLicenseExpression>
1919
<PackageProjectUrl>https://github.com/npgsql/efcore.pg</PackageProjectUrl>

Directory.Packages.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
3-
<EFCoreVersion>[7.0.1,8.0.0)</EFCoreVersion>
3+
<EFCoreVersion>[7.0.3,8.0.0)</EFCoreVersion>
44
<MicrosoftExtensionsVersion>7.0.0</MicrosoftExtensionsVersion>
5-
<NpgsqlVersion>7.0.1</NpgsqlVersion>
5+
<NpgsqlVersion>7.0.2</NpgsqlVersion>
66
</PropertyGroup>
77

88
<ItemGroup>

test/EFCore.PG.FunctionalTests/BulkUpdates/InheritanceBulkUpdatesNpgsqlTest.cs

+24
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,30 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool
206206
AssertExecuteUpdateSql();
207207
}
208208

209+
public override async Task Update_with_interface_in_property_expression(bool async)
210+
{
211+
await base.Update_with_interface_in_property_expression(async);
212+
213+
AssertExecuteUpdateSql(
214+
"""
215+
UPDATE "Drinks" AS d
216+
SET "SugarGrams" = 0
217+
WHERE d."Discriminator" = 'Coke'
218+
""");
219+
}
220+
221+
public override async Task Update_with_interface_in_EF_Property_in_property_expression(bool async)
222+
{
223+
await base.Update_with_interface_in_EF_Property_in_property_expression(async);
224+
225+
AssertExecuteUpdateSql(
226+
"""
227+
UPDATE "Drinks" AS d
228+
SET "SugarGrams" = 0
229+
WHERE d."Discriminator" = 'Coke'
230+
""");
231+
}
232+
209233
[ConditionalFact]
210234
public virtual void Check_all_tests_overridden()
211235
=> TestHelpers.AssertAllMethodsOverridden(GetType());

test/EFCore.PG.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesNpgsqlTest.cs

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Npgsql.EntityFrameworkCore.PostgreSQL.Update;
88

9-
public class NonSharedModelBulkUpdatesSqlServerTest : NonSharedModelBulkUpdatesTestBase
9+
public class NonSharedModelBulkUpdatesNpgsqlTest : NonSharedModelBulkUpdatesTestBase
1010
{
1111
protected override ITestStoreFactory TestStoreFactory => NpgsqlTestStoreFactory.Instance;
1212

@@ -41,6 +41,17 @@ public override async Task Delete_aggregate_root_when_table_sharing_with_non_own
4141
AssertSql();
4242
}
4343

44+
public override async Task Update_non_owned_property_on_entity_with_owned(bool async)
45+
{
46+
await base.Update_non_owned_property_on_entity_with_owned(async);
47+
48+
AssertSql(
49+
"""
50+
UPDATE "Owner" AS o
51+
SET "Title" = 'SomeValue'
52+
""");
53+
}
54+
4455
public override async Task Delete_predicate_based_on_optional_navigation(bool async)
4556
{
4657
await base.Delete_predicate_based_on_optional_navigation(async);

test/EFCore.PG.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesNpgsqlTest.cs

+23-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public TPCInheritanceBulkUpdatesNpgsqlTest(
1111
: base(fixture)
1212
{
1313
ClearLog();
14-
// Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
14+
Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
1515
}
1616

1717
public override async Task Delete_where_hierarchy(bool async)
@@ -176,6 +176,28 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool
176176
AssertExecuteUpdateSql();
177177
}
178178

179+
public override async Task Update_with_interface_in_property_expression(bool async)
180+
{
181+
await base.Update_with_interface_in_property_expression(async);
182+
183+
AssertExecuteUpdateSql(
184+
"""
185+
UPDATE "Coke" AS c
186+
SET "SugarGrams" = 0
187+
""");
188+
}
189+
190+
public override async Task Update_with_interface_in_EF_Property_in_property_expression(bool async)
191+
{
192+
await base.Update_with_interface_in_EF_Property_in_property_expression(async);
193+
194+
AssertExecuteUpdateSql(
195+
"""
196+
UPDATE "Coke" AS c
197+
SET "SugarGrams" = 0
198+
""");
199+
}
200+
179201
[ConditionalFact]
180202
public virtual void Check_all_tests_overridden()
181203
=> TestHelpers.AssertAllMethodsOverridden(GetType());

test/EFCore.PG.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesNpgsqlTest.cs

+14
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,20 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool
140140
AssertExecuteUpdateSql();
141141
}
142142

143+
public override async Task Update_with_interface_in_property_expression(bool async)
144+
{
145+
await base.Update_with_interface_in_property_expression(async);
146+
147+
AssertExecuteUpdateSql();
148+
}
149+
150+
public override async Task Update_with_interface_in_EF_Property_in_property_expression(bool async)
151+
{
152+
await base.Update_with_interface_in_EF_Property_in_property_expression(async);
153+
154+
AssertExecuteUpdateSql();
155+
}
156+
143157
[ConditionalFact]
144158
public virtual void Check_all_tests_overridden()
145159
=> TestHelpers.AssertAllMethodsOverridden(GetType());

test/EFCore.PG.FunctionalTests/Query/CitextQueryTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void StartsWith_param_pattern()
4949
5050
SELECT s."Id", s."CaseInsensitiveText"
5151
FROM "SomeEntities" AS s
52-
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND (s."CaseInsensitiveText" LIKE @__param_0_1 || '%' ESCAPE '') AND left(s."CaseInsensitiveText", length(@__param_0))::citext = @__param_0::citext)
52+
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND (s."CaseInsensitiveText" LIKE @__param_0_1 || '%' ESCAPE '') AND left(s."CaseInsensitiveText", length(@__param_0_1))::citext = @__param_0_1::citext)
5353
LIMIT 2
5454
""");
5555
}
@@ -104,7 +104,7 @@ public void EndsWith_param_pattern()
104104
105105
SELECT s."Id", s."CaseInsensitiveText"
106106
FROM "SomeEntities" AS s
107-
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND right(s."CaseInsensitiveText", length(@__param_0_1))::citext = @__param_0::citext)
107+
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND right(s."CaseInsensitiveText", length(@__param_0_1))::citext = @__param_0_1::citext)
108108
LIMIT 2
109109
""");
110110
}

test/EFCore.PG.FunctionalTests/Update/StoredProcedureUpdateNpgsqlTest.cs

+26
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,32 @@ await base.Tpc(
528528
""");
529529
}
530530

531+
public override async Task Non_sproc_followed_by_sproc_commands_in_the_same_batch(bool async)
532+
{
533+
await base.Non_sproc_followed_by_sproc_commands_in_the_same_batch(
534+
async,
535+
"""
536+
CREATE PROCEDURE "EntityWithAdditionalProperty_Insert"(name text, OUT id int, additional_property int) LANGUAGE plpgsql AS $$
537+
BEGIN
538+
INSERT INTO "EntityWithAdditionalProperty" ("Name", "AdditionalProperty") VALUES (name, additional_property) RETURNING "Id" INTO id;
539+
END $$
540+
""");
541+
542+
AssertSql(
543+
"""
544+
@p2='1'
545+
@p0='2'
546+
@p3='1'
547+
@p1='Entity1_Modified'
548+
@p4='Entity2'
549+
@p5='0'
550+
551+
UPDATE "EntityWithAdditionalProperty" SET "AdditionalProperty" = @p0, "Name" = @p1
552+
WHERE "Id" = @p2 AND "AdditionalProperty" = @p3;
553+
CALL "EntityWithAdditionalProperty_Insert"(@p4, NULL, @p5);
554+
""");
555+
}
556+
531557
protected override void ConfigureStoreGeneratedConcurrencyToken(EntityTypeBuilder entityTypeBuilder, string propertyName)
532558
=> entityTypeBuilder.Property<uint?>(propertyName)
533559
.HasColumnName("xmin")

0 commit comments

Comments
 (0)