Share via


ContainerDefinition<T>.WithPartitionKeyDefinitionVersion Method

Definition

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

T

An instance of the current Fluent builder.

Applies to

See also