Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Spring Cloud Spanner - Support "Set" Type #3291

Open
ps882 opened this issue Oct 7, 2024 · 0 comments
Open

Spring Cloud Spanner - Support "Set" Type #3291

ps882 opened this issue Oct 7, 2024 · 0 comments
Labels

Comments

@ps882
Copy link

ps882 commented Oct 7, 2024

We'd love to accept your patches and contributions to this project. There are just a few small
guidelines you need to follow before opening an issue or a PR:

  1. Ensure the issue was not already reported.
  2. Open a new issue if you are unable to find an existing issue addressing your problem. Make sure
    to include a title and clear description, as much relevant information as possible, and a code
    sample or an executable test case demonstrating the expected behavior that is not occurring.
  3. Discuss the priority and potential solutions with the maintainers in the issue. The maintainers
    would review the issue and add a label "Accepting Contributions" once the issue is ready for
    accepting contributions.
  4. Open a PR only if the issue is labeled with "Accepting Contributions", ensure the PR description
    clearly describes the problem and solution. Note that an open PR without an issue labeled with "
    Accepting Contributions" will not be accepted.

See
also CONTRIBUTING.md
.

Is your feature request related to a problem? Please describe.
I have a requirement where i need to store distinct values (labels) in my table but currently Spanner only allows "List" and not "Set". Which means i have to do the validation that distinct items are stored, on my own and then save the values in SpannerRepository.

An interesting observation was, when i define the field as "Set" and then call save() it gets saved. But when i try to read it gives me casting error that it cannot cast from List to Set. Which means SpannerRepository takes the Set field and saves it as List because that's what it supports

Describe the solution you'd like
Spanner Spring supports Set type so that i can define my pojo label field as "Set"

Describe alternatives you've considered
Ensuring the labels are unique on my own.

Additional context
Add any other context or screenshots about the feature request here.

https://googlecloudplatform.github.io/spring-cloud-gcp/3.2.1/reference/html/spanner.html#_supported_types

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants