Fixes #20604 - Treat ToString as casting to string in the database#33701
Conversation
|
The build Helix task seems to be stuck, but I'm not sure how to fix that. |
a9f86ad to
4170742
Compare
cincuranet
left a comment
There was a problem hiding this comment.
LGTM, but maybe @roji sees something that I don't.
roji
left a comment
There was a problem hiding this comment.
The changes look OK, but I'm still a bit unsure as to the general utility of allowing ToString() for enums, which get mapped to integers by default in the database... In other words, this probably is useful only when value-converting the enum to string (which may be OK).
If we really want to allow arbitrary ToString() on anything - regardless of value conversion - we may as well just always ToString(), regardless of the CLR type or anything else (i.e. why limit just to enums?). Otherwise we may want to think a bit more generally before doing this.
Maybe let's discuss this in design today?
|
Yeah, I see - it's just that we probably need to discuss a broader strategy here when it comes to ToString, value conversion, etc. beyond just the enum case. |
|
Merging changes with #33706 |
Fixes #20604