Describe the bug
CosmosContainer.replace() does not work unless container settings includes a self link. We should be able to determine the self link automatically so it doesn't have to be explicitly provided.
To Reproduce
Attempt to replace a container with settings not including a self link.
Expected behavior
Should probably be able determine self link from container id + database id.
Actual behavior
Exception when attempting to replace container:
java.lang.IllegalArgumentException: Entity with the specified id does not exist in the system.
at com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest.<init>(RxDocumentServiceRequest.java:202)
at com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest.<init>(RxDocumentServiceRequest.java:232)
at com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest.<init>(RxDocumentServiceRequest.java:273)
at com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest.create(RxDocumentServiceRequest.java:410)
at com.microsoft.azure.cosmosdb.rx.internal.RxDocumentClientImpl.replaceCollectionInternal(RxDocumentClientImpl.java:676)
at com.microsoft.azure.cosmosdb.rx.internal.RxDocumentClientImpl.lambda$replaceCollection$12(RxDocumentClientImpl.java:660)
at com.microsoft.azure.cosmosdb.rx.internal.ObservableHelper.lambda$inlineIfPossibleAsObs$1(ObservableHelper.java:55)
at com.microsoft.azure.cosmosdb.rx.internal.BackoffRetryUtility.lambda$executeRetry$2(BackoffRetryUtility.java:102)
Environment summary
SDK Version: v3 beta 3
Java JDK version: Java 8
OS Version (e.g. Windows, Linux, MacOSX) osx
Additional context
Add any other context about the problem here.
Describe the bug CosmosContainer.replace() does not work unless container settings includes a self link. We should be able to determine the self link automatically so it doesn't have to be explicitly provided.
To Reproduce Attempt to replace a container with settings not including a self link.
Expected behavior Should probably be able determine self link from container id + database id.
Actual behavior Exception when attempting to replace container:
Environment summary SDK Version: v3 beta 3 Java JDK version: Java 8 OS Version (e.g. Windows, Linux, MacOSX) osx
Additional context Add any other context about the problem here.