Creating converters based on multiple attributes in JPA 2.1
JPA 2.2 doesn't support this feature.
If you are using Hibernate, then you can simply use a Hibernate CompositeUserType
.
Hibernate gives you the flexibility of mapping one or more SQL types to specific Domain Model subtypes (e.g. Currency, Money).