Identity
Creates a IndexField for the given class, DataCaches can use this field to efficiently index entities for queries on this field. Only one Identity field is allowed per class.
Compound keys can be created as follows:
data class CompoundKey(val id1: String, val id2: String)
val CompoundKey.id get() = "$id1:$id2"
Content copied to clipboard
Do note that using compound keys like this does not allow for indexing of the separate fields, queries on id1
or id2
will not be eligible for optimization.