GeneratedUuid

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class GeneratedUuid(val strategy: UuidStrategy = UuidStrategy.TIME_ORDERED)

Auto-populates a UUID field on every INSERT via io.kandra.core.KandraUuid, the same way CreatedAt is auto-populated. Any caller-supplied value is overwritten. Never touched by update()/updateForce() — primary key components are immutable in Cassandra. Must be on a UUID field.

Use on a @ClusteringKey/@PartitionKey to avoid the same-millisecond collision risk of keys derived from Instant.now().

Properties

Link copied to clipboard