spring-data-relational icon indicating copy to clipboard operation
spring-data-relational copied to clipboard

Ability to override JdbcType

Open pavetok opened this issue 10 months ago • 0 comments

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

pavetok avatar Oct 21 '23 06:10 pavetok