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

Create table lever mapper, rather than just column level mapping #2104

Open
james1301 opened this issue Jul 25, 2024 · 0 comments
Open

Create table lever mapper, rather than just column level mapping #2104

james1301 opened this issue Jul 25, 2024 · 0 comments

Comments

@james1301
Copy link

Hi, for a column mapping we can have a type mapper to convert from an interface to a concrete type, like in the instance of a json column we can map that. But we cannot do this for a whole table, we cannot have a table mapping that uses an interface, rather than the concrete type.

In our solution we have heavily modularised into specific types/related types series of projects, and each module has a provider which deals with it's own queries to the database. Using the concrete type here is all good when it is the same module. The problem comes when we have a more complex module that uses types from other modules. We only expose interfaces outside of these module projects and do not want to reference projects that have the concrete instances.

So how could we do something similar to a column mapping but for a table so we can map an interface to a concrete type? That way we can supply the table mapping in some form and register it in our concrete modules project leaving the complex mapping to only need reference the interface. Obviously underneath this table mapping, it would need individual column mappings for all of it's types as usual.

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

No branches or pull requests

1 participant