Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPC: Bug while seeding #27945

Closed
smitpatel opened this issue May 4, 2022 · 1 comment · Fixed by #27988
Closed

TPC: Bug while seeding #27945

smitpatel opened this issue May 4, 2022 · 1 comment · Fixed by #27988
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@smitpatel
Copy link
Member

smitpatel commented May 4, 2022

 Message: 
System.InvalidOperationException : The entity type 'DerivedInheritanceRelationshipEntity' is not mapped to the store object 'BaseEntities'.

  Stack Trace: 
TableBase.CheckMappedEntityType(IEntityType entityType) line 134
ITableBase.GetRowInternalForeignKeys(IEntityType entityType) line 168
SharedTableEntryMap`1.GetMainEntry(IUpdateEntry entry) line 75
SharedTableEntryMap`1.GetMainEntry(IUpdateEntry entry) line 81
SharedTableEntryMap`1.GetOrAddValue(IUpdateEntry entry, SharedTableEntryValueFactory`1 createElement) line 51
CommandBatchPreparer.CreateModificationCommands(IList`1 entries, IUpdateAdapter updateAdapter, Func`1 generateParameterName) line 199
CommandBatchPreparer.BatchCommands(IList`1 entries, IUpdateAdapter updateAdapter)+MoveNext() line 67
BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection) line 57
RelationalDatabase.SaveChanges(IList`1 entries) line 57
StateManager.SaveChanges(IList`1 entriesToSave) line 1101
StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess) line 1164
<>c.<SaveChanges>b__104_0(DbContext _, ValueTuple`2 t) line 1145
<>c__DisplayClass28_0`2.<Execute>b__0(DbContext context, TState state) line 207
ExecutionStrategy.ExecuteImplementation[TState,TResult](Func`3 operation, Func`3 verifySucceeded, TState state) line 224
ExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded) line 206
StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess) line 1141
DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess) line 604
DbContext.SaveChanges() line 555
InheritanceRelationshipsContext.Seed(InheritanceRelationshipsContext context) line 72
InheritanceRelationshipsQueryFixtureBase.Seed(InheritanceRelationshipsContext context) line 566
SharedStoreFixtureBase`1.<InitializeAsync>b__21_2(DbContext c) line 65
SqlServerTestStore.Initialize(Func`1 createContext, Action`1 seed, Action`1 clean) line 88
<>c__DisplayClass13_0.<Initialize>b__0() line 36
TestStoreIndex.CreateShared(String name, Action initializeDatabase) line 25
TestStore.Initialize(IServiceProvider serviceProvider, Func`1 createContext, Action`1 seed, Action`1 clean) line 36
RelationalTestStore.Initialize(IServiceProvider serviceProvider, Func`1 createContext, Action`1 seed, Action`1 clean) line 40
SharedStoreFixtureBase`1.InitializeAsync() line 65

Tests are skipped with #3170 but mainly it is failing initialization of fixture
Changes_in_derived_related_entities_are_detected
Entity_can_make_separate_relationships_with_base_type_and_derived_type_both

@smitpatel
Copy link
Member Author

TPCRelationshipsQuerySqlServerTest whole class failure in seeding.

@ajcvickers ajcvickers added this to the 7.0.0 milestone May 7, 2022
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label May 10, 2022
@AndriySvyryd AndriySvyryd removed their assignment May 10, 2022
AndriySvyryd added a commit that referenced this issue May 10, 2022
…he dependent doesn't use TPH

Don't configure table name for abstract types in TPC that have a corresponding DbSet property
Make `ToTable(b => {})` map the entity type to the default table

Fixes #3170
Fixes #27608
Fixes #27945
Fixes #27947
AndriySvyryd added a commit that referenced this issue May 10, 2022
…he dependent doesn't use TPH

Don't configure table name for abstract types in TPC that have a corresponding DbSet property
Make `ToTable(b => {})` map the entity type to the default table

Fixes #3170
Fixes #27608
Fixes #27945
Fixes #27947
AndriySvyryd added a commit that referenced this issue May 10, 2022
…he dependent doesn't use TPH

Don't configure table name for abstract types in TPC that have a corresponding DbSet property
Make `ToTable(b => {})` map the entity type to the default table

Fixes #3170
Fixes #27608
Fixes #27945
Fixes #27947
AndriySvyryd added a commit that referenced this issue May 11, 2022
…he dependent doesn't use TPH

Don't configure table name for abstract types in TPC that have a corresponding DbSet property
Make `ToTable(b => {})` map the entity type to the default table

Fixes #3170
Fixes #27608
Fixes #27945
Fixes #27947
AndriySvyryd added a commit that referenced this issue May 11, 2022
Don't configure table name for abstract types in TPC that have a corresponding DbSet property
Make ToTable(b => {}) map the entity type to the default table

Fixes #3170
Fixes #27608
Fixes #27945
Fixes #27947
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-preview5 May 25, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-preview5, 7.0.0 Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants