-
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
Support mapping identity columns to enum properties #25536
Conversation
if (converter != null) | ||
{ | ||
var type = converter.ProviderClrType.UnwrapNullableType(); | ||
if (!type.IsInteger() |
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.
This seems like a fairly provider-specific thing to embed in the general relational code (e.g. PG doesn't support decimal "identity" columns)...
I don't have a lot of context so I'm not sure what this is supposed to address... but are we OK with other value-generated properties with converters (e.g. GUID, or string or whatever)?
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.
Sounds like you have feedback on #25178
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.
Well, AFAIK I'm OK with value conversion for identity/sequence columns, and I guess I'm also OK with value conversion combined with client-side value generation (though maybe I'm missing issues). The check that #25178 removed was against all combinations of conversion and generation, where the check being added here seems to bring back restrictions which seem specific to the SQL Server concept of identity, no?
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.
Asking for @AndriySvyryd's opinion on this, since he shared concerns that we were being too lenient by removing the entire check.
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.
I don't know of any specific issues, I'm just concerned with the lack of testing for other types
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.
@AndriySvyryd Are you in favor of adding this check back in in, as in this PR?
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.
Yes
Fixes #11970 Also, add back in the provider-agnostic check for converters with value generators, but make it less restrictive.
803545c
to
30957d1
Compare
Fixes #11970
Also, add back in the provider-agnostic check for converters with value generators, but make it less restrictive.