Feature/firestore optimistic locking #188#4279
Open
mehdi0933 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Open
Feature/firestore optimistic locking #188#4279mehdi0933 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
mehdi0933 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Conversation
019b79c to
c8c1fb1
Compare
c8c1fb1 to
69091fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses issue #188 by adding optimistic locking support to the Firestore sample application.
Changes
@Versionannotation to theUserentity in the Firestore sample app.versionfield.equals(),hashCode(), andtoString()methods in theUserclass to include the version field for consistency.Motivation
Optimistic locking is a critical feature for handling concurrent updates in Firestore. By adding this to the sample app, we provide a clear example for users on how to prevent data overwrites using Spring Data Cloud Firestore.
Testing
./mvnw clean compile.Userentity correctly maps the version field.Fixes #188
See
also CONTRIBUTING.md
.