A primary key identifies rows in Cassandra. It may be a single key or combine a partition key, which selects the partition, with a clustering key, which orders rows within that partition. section 4.1.3
Spring Data Cassandra expresses these responsibilities through annotations:
- @PrimaryKey marks a primary-key property, as with an ingredient identifier. section 4.1.3
- @PrimaryKeyColumn(type=PrimaryKeyType.PARTITIONED) marks a property as the partition key. section 4.1.3
- @PrimaryKeyColumn(type=PrimaryKeyType.CLUSTERED) marks a property as a clustering key; descending ordering places newer rows first. section 4.1.3
Taco persistence
A Taco uses a time-based UUID as its partition key and createdAt as a descending clustering key, so each partition presents newer tacos first. section 4.1.3




















