Contents

uniquenessConstraints

An array of arrays that contains one or more attributes with a value that must be unique over the instances of that entity.

Declaration

var uniquenessConstraints: [[Any]] { get set }

Discussion

Each inner array contains one or more NSAttributeDescription objects or strings that contain the names of attributes on the entity.

This value forms part of the entity’s version hash. Stores that don’t support uniqueness constraints must refuse to initialize when receiving a model that contains such constraints.

See Also

Configuring indexes and constraints