Closed DreamStar92 closed 3 weeks ago
That's not going to work as our CustomConversions
infrastructure is working on Class
as type. Any generics aren't available on that level. Types with generic types are only available when working with properties. Because you would register a converter, we resort to Class
and reduce the available information.
Going forward, Converter<S, T>
is a Spring Framework type that we do not control. You could implement GenericConverter
by providing getConvertibleTypes()
.
Taking a step back, enums are handled in private getPotentiallyConvertedSimpleWrite
and getPotentiallyConvertedSimpleRead
methods. We could make getPotentiallyConvertedSimpleWrite
additionally a protected method that you could then override and introduce your own handling.
Other than that, we cannot change a type that resides in Spring Framework.
Effectively solved my problem.
Hopefully GenericConverter can be mentioned in the Mapping.Converter section of the documentation.
@schauder The current converters are unable to handle universal types, such as: IntegerToEnumReadConverter, JsonReadConverter.
expected a universal converter
now each type needs to declare a converter
Anticipated modifications Interface adjustment and related calls in data-jdbc