Attribute converter like functionality for spring-cloud-gcp-data-datastore
See original GitHub issueIs your feature request related to a problem? Please describe. I’m unable to do custom conversions of specific fields between the pojo and db state, because this widely available feature is missing from spring-cloud-gcp-data-datastore, 2.0.2
Describe the solution you’d like https://www.baeldung.com/jpa-attribute-converters#using-the-converter for spring-cloud-gcp-data-datastore 😃
Describe alternatives you’ve considered Without spring data support, I’m forced to use https://github.com/objectify/objectify/blob/master/src/main/java/com/googlecode/objectify/annotation/Translate.java.
Additional context
The goal isn’t to have a global converter that converts between type A and type B (I think that is already available), but to have an annotation that can control this at the field level OR a global converter that receives the Field
object it’s converting - so for example it can check for any kind of custom annotation being present. (For example creating a @Sensitive
annotation that triggers an encryption during the conversion. https://aws.amazon.com/blogs/developer/client-side-encryption-for-amazon-dynamodb/ does something like this with @DoNotEncrypt
).
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
update: Spring Data Common has added “support for property-specific converters” in 3.0.0-M2
We don’t have a final design for the API and since we expect some changes in the actual store module I’d suggest keeping this ticket open.