Instance Property

derivationExpression

An expression for generating derived data.

Declaration

var derivationExpression: NSExpression? { get set }

Discussion

When using derived attributes in an SQL store, this expression should be

  • a keypath expression (including @operation components)

    a function expression using one of the predefined functions defined in NSExpression

Any keypaths used in the expression must be accessible from the entity on which the derived attribute is specified.

If you try to add a store to a coordinator whose model contains derived attributes of a type not supported by the store, the add fails and throws an error.