Skip to content

Cosmos: Entities without discriminator cannot be updated #17764

@AndriySvyryd

Description

@AndriySvyryd
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions