spring-data-relational
spring-data-relational copied to clipboard
Ability to override JdbcType
Just want to give yet another reason to support explicit JdbcType definition.
When implementing database agnostic onion/hexagonal architecture, we usually have 2 distinct models: domain and persistence. So port/adapter responsible for mapping between them. In the domain model we want to use rich java types (e.g. UUID), in the persistence model - more primitive types (e.g. String as common denominator). Some databases have UUID support, but not all of them. So it would be great to be able to override JdbcType for some fields of the persistence model (or arguments of repository methods) in per database/dialect manner.
Related issues: #746, #464