Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Allow different spellings for comparison #145

Closed
Matt-17 opened this issue Nov 10, 2020 · 6 comments
Closed

Allow different spellings for comparison #145

Matt-17 opened this issue Nov 10, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@Matt-17
Copy link

Matt-17 commented Nov 10, 2020

Sometimes I'm missing some mappings for different spelled properties. For example I have in my EF6 DB context something like:
some_special_ID and in my own class SomeSpecialId it does not match them. Here could be a broader search done (case insensitive and removed _).

Edit - this part is duplicate:
Also it would be great, if I could choose non-compilable mappings for missing properties like

Property1 = TODO,
TODO = Property2

Here I would immediatly see, there is something missing (in cases I need this addin, I have 50 Properties and more, not so easy to notice, something is missing.

Thank you and great add in. :-)

@cezarypiatek cezarypiatek added the enhancement New feature or request label Nov 11, 2020
@cezarypiatek
Copy link
Owner

cezarypiatek commented Nov 11, 2020

Hi @Matt-17

Ad1. I can extend MappingGenerator to handle the case with case sensivity as well as with underscores.
Ad2, Feature with comments for unmapped fields can be tracked here #7

In the meantime please consider supporting MappingGenerator project

@cezarypiatek
Copy link
Owner

@Matt-17
Here's a pre-release version that contains requested feature. Would you mind testing it and letting me know if it works as you expected?

VSIX:
https://ci.appveyor.com/api/buildjobs/tgci2cl29la6vucj/artifacts/MappingGenerator%2FMappingGenerator%2FMappingGenerator.Vsix%2Fbin%2FRelease%2FMappingGenerator.vsix

Nuget:
https://ci.appveyor.com/api/buildjobs/tgci2cl29la6vucj/artifacts/MappingGenerator%2FMappingGenerator%2FMappingGenerator%2Fbin%2FRelease%2FMappingGenerator.1.19.458.nupkg

@Matt-17
Copy link
Author

Matt-17 commented Nov 11, 2020

@cezarypiatek
Thank you for the fast improvement. This works as far as I mentioned it. So great work an consider this as closed so far. :-)

Only thing I saw, but is probably a new issue are cases like "Enabled" vs "IsEnabled", "Type" vs "Catalog_Type" or even very special cases in Germany with "a" vs "ae" vs "ä" you cannot handle all of them.

Anyway, for most database mappings this is a great improvement now. Thank you!

@cezarypiatek
Copy link
Owner

Can you provide a sample mapping code that illustrate all the cases that you mentioned?

@Matt-17
Copy link
Author

Matt-17 commented Nov 11, 2020

Yes, I try to figure out a bunch of samples. But as mentioned, this is much further than just ignoring uppercase and snake_case. So I suggest, this issue is closed by now and I think about it further (also how it could be solved, since this is definitely not desired behaviour by everybody).

@cezarypiatek
Copy link
Owner

An official version 1.20.463 with this feature has been released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants