Skip to content
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

Added Metadata to ColumnInfo which can be accessible from IMapper #690

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dario-l
Copy link

@dario-l dario-l commented Jun 29, 2023

Hi @schotime, I would love some feedback on this!

We have builtin solution for encryption by our custom encryption mechanism. We want to map specific properties using FluentMappings but there is no possible to pass additional metadata to the IMapper.

With this update I added Metadata dictionary which can be populated in fluent mappings and can be passed to any IMapper instance.

I will be happy if you accept my pull-request. 😃

@schotime
Copy link
Owner

schotime commented Jul 4, 2023

Hey, nice one. like it, however it's a breaking change.
And all the formatting changes that make it hard to decipher what you've changed, lol.

Ideally if we can find a way to make this non-breaking that would be great. I have some ideas, but would need to test them out. Happy for you to have a try though.

We actually do the same thing but we wrap all encrypted fields in a class which can then easily be mapped conventionally. Has the benefit of knowing which fields are encrypted just by looking at them.

@dario-l
Copy link
Author

dario-l commented Jul 4, 2023

And all the formatting changes that make it hard to decipher what you've changed, lol.

Sorry for that. It's by habit. 😄

Ideally if we can find a way to make this non-breaking that would be great. I have some ideas, but would need to test them out.

Right. Maybe overloaded methods on IMapper will be just enough?

We actually do the same thing but we wrap all encrypted fields in a class which can then easily be mapped conventionally. Has the benefit of knowing which fields are encrypted just by looking at them.

You mean base class or just additional class which maps to special table (for encrypted data) in db?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants