-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DATAMONGO-2341 - Support shard key derivation in save operations via @…
…Sharded annotation. Spring Data MongoDB uses the @Sharded annotation to identify entities stored in sharded collections. The shard key consists of a single or multiple properties present in every document within the target collection, and is used to distribute them across shards. Spring Data MongoDB will do best effort optimisations for sharded scenarios when using repositories by adding required shard key information, if not already present, to replaceOne filter queries when upserting entities. This may require an additional server round trip to determine the actual value of the current shard key. By setting @Sharded(immutableKey = true) no attempt will be made to check if an entities shard key changed. Please see the MongoDB Documentation for further details and the list below for which operations are eligible to auto include the shard key. * Reactive/CrudRepository.save(...) * Reactive/CrudRepository.saveAll(...) * Reactive/MongoTemplate.save(...) Original pull request: #833.
- Loading branch information
1 parent
f153399
commit 6259cd2
Showing
20 changed files
with
1,093 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.