Skip to content

Support custom type Mapper #22

Description

@skylve

I think it would be really cool to have custom type mapper that are used during the annotation processing (for enum, etc ...)

Maybe add an annotation @Mapper on top of a class that inherit from an interface Mapper<T, R> where T is the database type and R is our custom type.

We could go even further if T could be any of the basic handled types or a custom mapped type.
With this we could define a Mapper<String, BigNumber> and a Mapper<BigNumber, SpecialNumber> that would allow to directly map from String to SpecialNumber.

In case of multiple Mapper defined for the same type, we could throw an Ambiguous exception at compile time (yay Scala implicit system).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions