ContainerDefinition<T>.WithPartitionKeyDefinitionVersion Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the PartitionKeyDefinitionVersion
The partition key definition version 1 uses a hash function that computes hash based on the first 100 bytes of the partition key. This can cause conflicts for documents with partition keys greater than 100 bytes.
The partition key definition version 2 uses a hash function that computes hash based on the first 2 KB of the partition key.
public T WithPartitionKeyDefinitionVersion (Microsoft.Azure.Cosmos.PartitionKeyDefinitionVersion partitionKeyDefinitionVersion);
member this.WithPartitionKeyDefinitionVersion : Microsoft.Azure.Cosmos.PartitionKeyDefinitionVersion -> 'T
Public Function WithPartitionKeyDefinitionVersion (partitionKeyDefinitionVersion As PartitionKeyDefinitionVersion) As T
Parameters
- partitionKeyDefinitionVersion
- PartitionKeyDefinitionVersion
The partition key definition version
Returns
An instance of the current Fluent builder.