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
Currently a converter set into the @ValueConverter annotation (the one from Spring Data Elasticsearch, not the newer one from Spring Data Commons) can only have a no-arg constructor and has no information of the type that the annotation is put on.
Coming from the discussion in #2486 it should be possible to have this information. The long term solution sure is to use the logic from the spring-data-commons module which was introduced after Spring Data Elasticsearch had this feature, for this #2488 exists.
Looking at the code there is a short term solution if we allow the converter class specified in the annotation to derive from AbstractPropertyValueConverter. It then in the convert method has access to the proprties type by calling getProperty().getType()
The text was updated successfully, but these errors were encountered:
Currently a converter set into the
@ValueConverter
annotation (the one from Spring Data Elasticsearch, not the newer one from Spring Data Commons) can only have a no-arg constructor and has no information of the type that the annotation is put on.Coming from the discussion in #2486 it should be possible to have this information. The long term solution sure is to use the logic from the spring-data-commons module which was introduced after Spring Data Elasticsearch had this feature, for this #2488 exists.
Looking at the code there is a short term solution if we allow the converter class specified in the annotation to derive from
AbstractPropertyValueConverter
. It then in the convert method has access to the proprties type by callinggetProperty().getType()
The text was updated successfully, but these errors were encountered: