You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Azure Spring Data Cosmos client library for Java - Version 3.19.1
13
+
# Azure Spring Data Cosmos client library for Java - Version 3.20.0
14
14
15
15
16
16
**Azure Spring Data Cosmos** provides Spring Data support for Azure Cosmos DB using the [SQL API][sql_api_query], based on Spring Data framework.
@@ -81,7 +81,7 @@ If you are using Maven, add the following dependency.
81
81
<dependency>
82
82
<groupId>com.azure</groupId>
83
83
<artifactId>azure-spring-data-cosmos</artifactId>
84
-
<version>3.19.1</version>
84
+
<version>3.20.0</version>
85
85
</dependency>
86
86
```
87
87
[//]: #({x-version-update-end})
@@ -497,6 +497,8 @@ public class MyItem {
497
497
String _etag;
498
498
}
499
499
```
500
+
- Read more about Optimistic Locking [here](https://docs.microsoft.com/azure/cosmos-db/sql/database-transactions-optimistic-concurrency#optimistic-concurrency-control)
501
+
500
502
### Spring Data custom query, pageable and sorting
501
503
- Azure-spring-data-cosmos supports [spring data custom queries][spring_data_custom_query]
502
504
- Example, find operation, e.g., `findByAFieldAndBField`
- The [Entity](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.19.1/sdk/cosmos/azure-spring-data-cosmos#define-an-entity) and [Repository](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.19.1/sdk/cosmos/azure-spring-data-cosmos#create-repositories) definition is similar as above. You can put different database entities into different packages.
597
+
- The [Entity](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.20.0/sdk/cosmos/azure-spring-data-cosmos#define-an-entity) and [Repository](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.20.0/sdk/cosmos/azure-spring-data-cosmos#create-repositories) definition is similar as above. You can put different database entities into different packages.
596
598
597
599
- The `@EnableReactiveCosmosRepositories` or `@EnableCosmosRepositories` support user-define the cosmos template, use `reactiveCosmosTemplateRef` or `cosmosTemplateRef` to config the name of the `ReactiveCosmosTemplate` or `CosmosTemplate` bean to be used with the repositories detected.
598
600
- If you have multiple cosmos database accounts, you can define multiple `CosmosAsyncClient`. If the single cosmos account has multiple databases, you can use the same `CosmosAsyncClient` to initialize the cosmos template.
- The [Entity](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.19.1/sdk/cosmos/azure-spring-data-cosmos#define-an-entity) and [Repository](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.19.1/sdk/cosmos/azure-spring-data-cosmos#create-repositories) definition is similar as above. You can put different database entities into different packages.
782
+
- The [Entity](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.20.0/sdk/cosmos/azure-spring-data-cosmos#define-an-entity) and [Repository](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-data-cosmos_3.20.0/sdk/cosmos/azure-spring-data-cosmos#create-repositories) definition is similar as above. You can put different database entities into different packages.
781
783
- You can use `EnableReactiveCosmosRepositories` with different `reactiveCosmosTemplateRef` to define multiple databases in single cosmos account.
782
784
783
785
```java
@@ -888,7 +890,7 @@ public class MultiDatabaseApplication implements CommandLineRunner {
888
890
889
891
## Beta version package
890
892
891
-
Beta version built from `master` branch are available, you can refer to the [instruction](https://github.com/Azure/azure-sdk-for-java/blob/azure-spring-data-cosmos_3.19.1/CONTRIBUTING.md#nightly-package-builds) to use beta version packages.
893
+
Beta version built from `master` branch are available, you can refer to the [instruction](https://github.com/Azure/azure-sdk-for-java/blob/azure-spring-data-cosmos_3.20.0/CONTRIBUTING.md#nightly-package-builds) to use beta version packages.
892
894
893
895
## Troubleshooting
894
896
@@ -959,15 +961,15 @@ or contact [[email protected]][coc_contact] with any additional questions o
0 commit comments