question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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).

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
zhumin8commented, Aug 1, 2022

update: Spring Data Common has added “support for property-specific converters” in 3.0.0-M2

1reaction
mp911decommented, Apr 19, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

160. Spring Data Cloud Datastore
Spring Data is an abstraction for storing and retrieving POJOs in numerous storage technologies. Spring Cloud GCP adds Spring Data support for Google...
Read more >
How to implement an AttributeConverter to support custom types
One that converts the type used for your entity attribute to a type that gets handled by the JDBC driver when inserting or...
Read more >
JPA Attribute Converters - Baeldung
The plugin gently guides you through the subtleties of the most popular JPA implementations, visually reminds you of JPA features, generates ...
Read more >
JPA AttributeConverter - A Beginner's Guide - Vlad Mihalcea
Learn how the JPA AttributeConverter works and how you can use it to customize the entity attribute to the database column mapping.
Read more >
Does not have feature like JPA's AttributeConverter in spring ...
According to the spring-data-cassandra document, a converter that performs object mapping of cassandra side data is applied to the scope of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found