Entityproperty, to indicate that it's part of the partition key.
@PartitionKey private UUID id;This information is used by the mapper processor to generate default queries (for example a basic
Select). Note that an entity is not required to have a partition key, for example if it only gets mapped as a UDT.
If the partition key is composite, you must specify
value() to indicate the position
of each property:
@PartitionKey(1) private int pk1; @PartitionKey(2) private int pk2;If you don't specify positions, or if there are duplicates, the mapper processor will issue a compile-time error.
This annotation is mutually exclusive with
|Modifier and Type||Optional Element and Description|
The position of the property in the partition key.
public abstract int value
This is only required if the partition key is composite. Positions are not strictly required to be consecutive or start at a given index, but for clarity it is recommended to use consecutive integers.
Copyright © 2017–2019. All rights reserved.