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

Add a migrations warning for ValueGeneratedOnAdd for a non-key property for SqlServer #7295

Closed
AndriySvyryd opened this issue Dec 21, 2016 · 2 comments

Comments

@AndriySvyryd
Copy link
Member

If a key property is configured as ValueGeneratedOnAdd without an explicit ValueGenerationStrategy, then it will fall back to the default ValueGenerationStrategy configured on the model, however it will have no effect on non-key properties, which might be confusing for users not closely familiar with these configuration options.
However it can still be a valid model if the user adds custom SQL to add a trigger or other mechanism to generate the value, therefore only a warning should be shown.

@AndriySvyryd AndriySvyryd changed the title Add a migrations warning for ValueGeneratedOnAdd for a non-key for SqlServer Add a migrations warning for ValueGeneratedOnAdd for a non-key property for SqlServer Dec 21, 2016
@divega
Copy link
Contributor

divega commented Jan 6, 2017

EF Team Triage: We won't do this now but we can revisit if we get information from customers that indicates that the warning can help.

@divega divega closed this as completed Jan 6, 2017
@divega
Copy link
Contributor

divega commented Jan 6, 2017

If we ever do this we should consider generating a TODO comment.

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants