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-data-jpa sample does not work on emulator and does not have a test #2155

Closed
olavloite opened this issue Aug 8, 2024 · 0 comments · Fixed by #2245
Closed

spring-data-jpa sample does not work on emulator and does not have a test #2155

olavloite opened this issue Aug 8, 2024 · 0 comments · Fixed by #2245

Comments

@olavloite
Copy link
Collaborator

No description provided.

olavloite added a commit that referenced this issue Aug 29, 2024
Modifies the Spring Data JPA sample to (also) run on the Spanner Emulator.
This was previously not possible, as the use of bit-reversed sequences in
Hibernate also requires the backend to support 'concurrent' transactions.
That is: When using bit-reversed sequences or other auto-generated primary
keys, Hibernate will do the following:
1. Start a transaction for the application and try to insert/update data
   in that transaction.
2. If a new auto-generated ID is required, start a separate transaction to
   generate a batch of identifiers.

The above would not work on previous versions of the emulator, as the
second transaction could not be started. The latest version of the
emulator supports this.

This change also adds a test run for the sample application to the
standard presubmit checks.

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

Successfully merging a pull request may close this issue.

1 participant