You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an entity with ZoneId property.
When I made parsing String value within ZoneId.of() method I've got ZoneRegion implementation class.
E.g Zone.of("Europe/Paris) -> ZoneRegion("Europe/Paris)
During the Writing entity everything goes fine and have next info in hashes:
3)"timezone"
4) "Europe/Paris"
5) "timezone._class"
6) "java.time.ZoneRegion"
Accordingly, when I try to read value - follow exception occurs:
ConverterNotFoundException: No converter found capable of converting from type [byte[]] to type [java.time.ZoneRegion]
The text was updated successfully, but these errors were encountered:
Thanks for reporting the issue. The problem is on our side because we write a more concrete type hint (ZoneRegion instead of ZoneId) while we have only a converter for ZoneId registered. We can likely skip type hints on the reading side for types that are associated with a converter anyway as the persistent property provides sufficient details here.
We now try to eagerly apply a custom converter when reading Redis properties in the MappingRedisConverter before considering type hints from the hash.
We require type hints to properly restore the target type for a hash entry as Redis data is all byte arrays, so a simple String needs a type hint before we can load it back into an e.g. Object-typed property. Subtypes of properties (such as ZoneRegion for ZoneId) are sometimes not associated with a converter as only the parent type (ZoneId) is associated with a converter. Trying to convert the value into the subtype directly through our ConversionService would fail in that case.
Closes#2307
We now try to eagerly apply a custom converter when reading Redis properties in the MappingRedisConverter before considering type hints from the hash.
We require type hints to properly restore the target type for a hash entry as Redis data is all byte arrays, so a simple String needs a type hint before we can load it back into an e.g. Object-typed property. Subtypes of properties (such as ZoneRegion for ZoneId) are sometimes not associated with a converter as only the parent type (ZoneId) is associated with a converter. Trying to convert the value into the subtype directly through our ConversionService would fail in that case.
Closes#2307
I have an entity with ZoneId property.
When I made parsing String value within ZoneId.of() method I've got ZoneRegion implementation class.
E.g Zone.of("Europe/Paris) -> ZoneRegion("Europe/Paris)
During the Writing entity everything goes fine and have next info in hashes:
3)"timezone"
4) "Europe/Paris"
5) "timezone._class"
6) "java.time.ZoneRegion"
Accordingly, when I try to read value - follow exception occurs:
ConverterNotFoundException: No converter found capable of converting from type [byte[]] to type [java.time.ZoneRegion]
The text was updated successfully, but these errors were encountered: