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

Custom conversions between types #77

Open
reyleo opened this issue Oct 19, 2017 · 0 comments
Open

Custom conversions between types #77

reyleo opened this issue Oct 19, 2017 · 0 comments

Comments

@reyleo
Copy link

reyleo commented Oct 19, 2017

Add feature to define custom conversion between types rather than fields

Proposal

@JMapTypeConversion(from=Long.class, to=BigDecimal.class)
BigDecimal fromLongToBigDecimal(Long longValue) {
...
}
@JMapTypeConversion(to=BigDecimal.class, from=Long.class)
Long fromBigDecimalToLong(BigDecimal decimal) {
...
}

Conversion of that type is only applied when no conversions by name are found

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