Skip to content

Index attribute on BaseEntityTableData prevents CosmosEntityTableData with CosmosDB EF Provider #173

@richard-einfinity

Description

@richard-einfinity

Describe the bug

Index attribute on BaseEntityTableData prevents CosmosEntityTableData with CosmosDB EF Provider. Context throws System.InvalidOperationException. The entity type 'ModelName' has an index defined over properties 'UpdatedAt,Deleted'. The Azure Cosmos DB provider for EF Core currently does not support index definitions.

To Reproduce

Steps to reproduce the behavior:

Define Models based on CosmosEntityTableData
Add Models to Context and perform entity configuration.
Call await dbContext.Database.EnsureCreatedAsync();

Expected behavior

Database and containers to be created in CosmosDB

What platforms?

Note: Any bug or feature request that is opened for an unsupported environment will be automatically closed.

  • Server:
    • Version of dotnet being used to compile? net8
    • Library versions? CommunityToolkit.Datasync.Server.EntityFrameworkCore 8.0.4.
    • What database are you using? CosmosDB
    • Where are you running the server? Azure

Additional context

Worked around by creating a new CosmosEntityTableData base model inheriting from ITableData directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientImprovements or additions to the client code

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions