KEMBAR78
Allow UseSequence and HiLo on non-key properties · Issue #29758 · dotnet/efcore · GitHub
Skip to content

Allow UseSequence and HiLo on non-key properties #29758

@roji

Description

@roji

SqlServerModelValidator currently blocks UseSequence and UseHilo on non-key properties. We should consider allowing this; we already allow configuring SQL Server IDENTITY on non-key properties, and the user is expressing their intent very clearly, so I'm not sure why we'd block these. For sequences specifically, people can already configure them manually with HasDefaultValueSql, so we're really only blocking our new 7.0 sugar.

(note that Npgsql currently doesn't block these, we should probably align one way or the other)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions