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

Cosmos: Entities without discriminator cannot be updated #17764

Closed
AndriySvyryd opened this issue Sep 11, 2019 · 0 comments · Fixed by #17876
Closed

Cosmos: Entities without discriminator cannot be updated #17764

AndriySvyryd opened this issue Sep 11, 2019 · 0 comments · Fixed by #17876
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@AndriySvyryd
Copy link
Member

modelBuilder.Entity<Vehicle>().HasNoDiscriminator();

System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
at CosmosPropertyExtensions.GetPropertyName(IProperty property) in CosmosPropertyExtensions.cs line: 23
at CosmosDatabaseWrapper.Save(IUpdateEntry entry) in CosmosDatabaseWrapper.cs line: 207
at CosmosDatabaseWrapper.SaveChanges(IList1 entries) in CosmosDatabaseWrapper.cs line: 106 at StateManager.SaveChanges(IList1 entriesToSave) in StateManager.cs line: 1132
at StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess) in StateManager.cs line: 913
at DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess) in DbContext.cs line: 465
at DbContext.SaveChanges() in DbContext.cs line: 428
at EmbeddedDocumentsTest.Can_attach_owner_with_dependents() in EmbeddedDocumentsTest.cs line: 138
at EmbeddedDocumentsTest.Can_attach_owner_with_dependents() in EmbeddedDocumentsTest.cs line: 147

@AndriySvyryd AndriySvyryd self-assigned this Sep 11, 2019
@divega divega added this to the 3.1.0 milestone Sep 11, 2019
AndriySvyryd added a commit that referenced this issue Sep 17, 2019
Allow to update entities without discriminators
Don't try to add the default discriminator if a conflicting property already exists

Fixes #17764
Fixes #17302
Fixes #17814
@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 Sep 17, 2019
@AndriySvyryd AndriySvyryd removed their assignment Sep 17, 2019
AndriySvyryd added a commit that referenced this issue Sep 17, 2019
Allow to update entities without discriminators
Don't try to add the default discriminator if a conflicting property already exists

Fixes #17764
Fixes #17302
Fixes #17814
AndriySvyryd added a commit that referenced this issue Sep 17, 2019
Allow to update entities without discriminators
Don't try to add the default discriminator if a conflicting property already exists

Fixes #17764
Fixes #17302
Fixes #17814
AndriySvyryd added a commit that referenced this issue Sep 17, 2019
Allow to update entities without discriminators
Don't try to add the default discriminator if a conflicting property already exists

Fixes #17764
Fixes #17302
Fixes #17814
AndriySvyryd added a commit that referenced this issue Sep 17, 2019
Allow to update entities without discriminators
Don't try to add the default discriminator if a conflicting property already exists

Fixes #17764
Fixes #17302
Fixes #17814
@ajcvickers ajcvickers modified the milestones: 3.1.0, 3.1.0-preview1 Oct 15, 2019
@ajcvickers ajcvickers modified the milestones: 3.1.0-preview1, 3.1.0 Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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