-
Notifications
You must be signed in to change notification settings - Fork 61
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 test case for case sensitive table with two columns that have the same name but different casing #408
Comments
Closing this issue - I don't think we can handle two columns with the same name but different casing since the POCO needs to have unique member names. |
When you say "needs to have unique members names" do you mean by convention of what we require? Because you can have multiple members that differ only in case in C# https://dotnetfiddle.net/GMRPlO And now that we require the casing to be the same as in the DB this should be a valid scenario for us to support - or am I missing something that would make this not possible? |
Ah I see, I mistook the CA1708 convention rule for an actual error. In that case this should be a valid scenario. |
One issue I ran into while working on an input binding for this scenario is with Newtonsoft.Json deserialization being case insensitive. When the POCO contains "Name" and "NAME", Newtonsoft.Json throws this error We would have to switch over to using System.Text.Json since Newtonsoft.Json doesn't support case sensitive deserialization. JamesNK/Newtonsoft.Json#815 |
Ah, yeah ok. The JSON serialization is something that the AF folks have suggested we use from their configuration instead anyways so if we did switch anything it would just be to do everything there (which means it could still potentially have this problem). I doubt this is going to be a common use case though so doesn't seem like something we need to spend a bunch of time fixing - rather for now I think just documenting that we don't allow column names that only differ in casing. @dzsquared @chlafreniere That sound reasonable to you? |
Seems reasonable to me |
Fixes #408. Documenting that the table cannot contain two columns that only differ by case.
* Update README Fixes #408. Documenting that the table cannot contain two columns that only differ by case. * Update README.md Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
No description provided.
The text was updated successfully, but these errors were encountered: