Skip to content

UseEnumCheckConstraints does not respect DbContext conventions #154

@iPilot

Description

@iPilot

When enum is derived from ulong and used as a type of a property that translates to a table column with TypeName configured using

protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{
    configurationBuilder.Properties<ulong>(p => p.HaveColumnType("bigint"));
}

(regardless ColumnAttribute presence), then enum values for constraint are generated as floating point numbers (double or decimal it is not clear).

When ColumnAttribute and its TypeName property are provided explicitly then enum values are generated correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions