GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp

Attribute converter like functionality for spring-cloud-gcp-data-datastore

Open
#438 5 comments 0 reactions 0 assignees View on GitHub
datastore priority: p3 type: enhancement
Dominant language
Java
Stars
551
Forks
349
Avg merge
1d 13h
Merged PRs (30d)
14

Description

**Is 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`).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.