Annotation which defines an alternate set of columns that uniquely identify a row instance.
Row definitions aren't required to have any
@AlternateKey
annotations.
An alternate key is essentially the same as a secondary index
,
except with a uniqueness constraint applied. Attempting to insert a row with a conflicting
alternate key causes a UniqueConstraintException
to be thrown.
- See Also:
-
Required Element Summary
-
Element Details
-
value
String[] valueThe set of column names within alternate key, whose ordering affects the natural ordering of the rows within the alternate key index. Column names can be optionally prefixed with a '+' or '-' character to indicate ascending or descending order. By default, column order is ascending.
-