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

Allow UseSequence and HiLo on non-key properties #29758

Closed
roji opened this issue Dec 4, 2022 · 1 comment · Fixed by #29864
Closed

Allow UseSequence and HiLo on non-key properties #29758

roji opened this issue Dec 4, 2022 · 1 comment · Fixed by #29864
Assignees
Labels
area-model-building area-sqlserver closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Dec 4, 2022

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)

@roji
Copy link
Member Author

roji commented Dec 9, 2022

Design decision: it's OK to allow these on non-key properties.

@roji roji self-assigned this Dec 9, 2022
@roji roji added this to the Backlog milestone Dec 9, 2022
roji added a commit to roji/efcore that referenced this issue Dec 15, 2022
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Dec 15, 2022
@roji roji modified the milestones: Backlog, 8.0.0 Dec 15, 2022
roji added a commit to roji/efcore that referenced this issue Dec 16, 2022
@ghost ghost closed this as completed in #29864 Dec 16, 2022
ghost pushed a commit that referenced this issue Dec 16, 2022
@ajcvickers ajcvickers modified the milestones: 8.0.0, 8.0.0-preview1 Jan 29, 2023
@ajcvickers ajcvickers modified the milestones: 8.0.0-preview1, 8.0.0 Nov 14, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-model-building area-sqlserver closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants