Skip to content

Commit c04450b

Browse files
committed
Clean up inheritance tests
1 parent 1832f8c commit c04450b

81 files changed

Lines changed: 4687 additions & 6172 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/EFCore.Relational/Properties/RelationalStrings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EFCore.Relational/Properties/RelationalStrings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@
805805
<comment>Error RelationalEventId.ForeignKeyPropertiesMappedToUnrelatedTables string string string string string string string</comment>
806806
</data>
807807
<data name="LogForeignKeyTpcPrincipal" xml:space="preserve">
808-
<value>The foreign key {foreignKeyProperties} on the entity type '{entityType}' targeting '{principalEntityType}' cannot be represented in the database. '{principalEntityType}' is mapped using the table per concrete type meaning that the derived entities will not be present in {'principalTable'}. If this foreign key on '{entityType}' will never reference entities derived from '{principalEntityType}' then the foreign key constraint name can be specified explicitly to force it to be created.</value>
808+
<value>The foreign key {foreignKeyProperties} on the entity type '{entityType}' targeting '{principalEntityType}' cannot be represented in the database. '{principalEntityType}' is mapped using the table-per-concrete-type (TPC), meaning that the derived entities will not be present in {'principalTable'}. If this foreign key on '{entityType}' will never reference entities derived from '{principalEntityType}', then the foreign key constraint name can be specified explicitly to force it to be created.</value>
809809
<comment>Warning RelationalEventId.ForeignKeyTpcPrincipalWarning string string string string string string string</comment>
810810
</data>
811811
<data name="LogGeneratingDown" xml:space="preserve">

test/EFCore.Cosmos.FunctionalTests/Query/Inheritance/InheritanceQueryCosmosFixture.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using Microsoft.EntityFrameworkCore.TestModels.InheritanceModel;
5-
64
namespace Microsoft.EntityFrameworkCore.Query.Inheritance;
75

86
public class InheritanceQueryCosmosFixture : InheritanceQueryFixtureBase
@@ -30,14 +28,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con
3028
{
3129
base.OnModelCreating(modelBuilder, context);
3230

33-
modelBuilder.Entity<Animal>().ToContainer("Animals");
34-
modelBuilder.Entity<Plant>().ToContainer("Plants");
35-
modelBuilder.Entity<Plant>().Property<string>("Discriminator").ToJsonProperty("_type");
36-
modelBuilder.Entity<Country>().ToContainer("Countries");
37-
modelBuilder.Entity<Drink>().ToContainer("Drinks");
38-
modelBuilder.Entity<KiwiQuery>().ToContainer("Animals");
39-
modelBuilder.Entity<AnimalQuery>().ToContainer("Animals");
40-
modelBuilder.Entity<BirdQuery>().ToContainer("Animals");
41-
modelBuilder.Entity<KiwiQuery>().ToContainer("Animals");
31+
modelBuilder.Entity<Root>().ToContainer("Roots");
32+
modelBuilder.Entity<RootReferencingEntity>().ToContainer("RootReferencingEntities");
4233
}
4334
}

0 commit comments

Comments
 (0)