Skip to content

Enable custom converters for single fields #1945

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
sothawo opened this issue Sep 24, 2021 · 0 comments · Fixed by #1953
Closed

Enable custom converters for single fields #1945

sothawo opened this issue Sep 24, 2021 · 0 comments · Fixed by #1953
Assignees
Labels
type: enhancement A general enhancement

Comments

@sothawo
Copy link
Collaborator

sothawo commented Sep 24, 2021

The standard converters for Spring / Spring Data allow conversion between a class T and a String in Spring Data Elasticsearch. It is not possible to define a converter only for a single property of an entity. This might be handy, when for example a String property should be converted into a different value before storing and reconverted after retrieving a document.

Spring Data Elasticsearch already has the possibility for converters attached to a property (conversion for date fields or range properties), this should be extended to allow for custom defined converters, either by adding an attribute to @Field or by introducing a new annotation.

@sothawo sothawo added the type: enhancement A general enhancement label Sep 24, 2021
@sothawo sothawo self-assigned this Oct 2, 2021
sothawo added a commit that referenced this issue Oct 5, 2021
Original Pull Request #1953 
Closes #1945
@sothawo sothawo added this to the 4.3 RC1 (2021.1.0) milestone Oct 5, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant