-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
SqlServerValueGenerationStrategy which conflicts now causes warning #19887
Conversation
src/EFCore.SqlServer/Metadata/Conventions/SqlServerStoreGenerationConvention.cs
Outdated
Show resolved
Hide resolved
@@ -241,4 +241,8 @@ | |||
<data name="FunctionOnClient" xml:space="preserve"> | |||
<value>The '{methodName}' method is not supported because the query has switched to client-evaluation. Inspect the log to determine which query expressions are triggering client-evaluation.</value> | |||
</data> | |||
<data name="LogConflictingValueGenerationStrategies" xml:space="preserve"> | |||
<value>Both the SqlServerValueGenerationStrategy {generationStrategy} and {otherGenerationStrategy} have been set on property '{propertyName}' on entity '{entityName}'. Usually this is a mistake. Only use these at the same time if you are sure you understand the consequences.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>Both the SqlServerValueGenerationStrategy {generationStrategy} and {otherGenerationStrategy} have been set on property '{propertyName}' on entity '{entityName}'. Usually this is a mistake. Only use these at the same time if you are sure you understand the consequences.</value> | |
<value>Both the SqlServerValueGenerationStrategy {generationStrategy} and {otherGenerationStrategy} have been set on property '{propertyName}' on entity type '{entityName}'. Usually this is a mistake. Only use these at the same time if you are sure you understand the consequences.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Will do.
@AndriySvyryd Added 2 functional tests that it a) throws by default, b) does not throw but just logs the warning if you override the default. |
Instead of throwing as it used to do. This fixes #16814.
By default the warning is still set up to throw, but now you could turn that off if you're sure you know what you're doing. Tests for that latter part will be forthcoming, but I wanted to get feedback that I'm going the right direction, plus agree on the message etc.