Closed sparkforreg closed 8 months ago
We just fixed a few bugs around that area. Care to upgrade spring-data-relational
to 3.2.1-SNAPSHOT
to retest whether the changes have addressed your issue?
thanks. 3.2.1-SNAPSHOT works as expected
Alright, thanks for checking. Closing as duplicate of #1689
Upgrading 3.1.5 -> 3.2.0 Using jdk temurin 17
I have custom converter that converts string to enum but looks like spring doesn't invoke it. I think problem is in MappingRelationalConverter.getPotentiallyConvertedSimpleRead
code "Enum.class.isAssignableFrom(target) && value instanceof CharSequence)" returns true and as result tries to convert str to enum via Enum.valueOf. But in my case expected code should be
getConversionService().convert(value, TypeDescriptor.forObject(value), createTypeDescriptor(type)). I called it in debug and it converts string to enum via my converter.
Here is stacktrace: