@PalmyraUniqueKey#

com.palmyralabs.palmyra.base.annotations.PalmyraUniqueKey

Declares a (composite) unique key over one or more fields. Target: TYPE. Retention: CLASS — consumed only through @PalmyraMappingConfig.uniqueKeys.

Attributes#

Attribute Signature
fields String[] fields() default {} — fields composing the unique key

Example#

@PalmyraMappingConfig(
    type = "User",
    uniqueKeys = {
        @PalmyraUniqueKey(fields = {"tenantId", "loginName"})
    }
)
public class User { }