withActions
withActions
is a mixin that exposes some methods on the PureModel
. The mixin is already applied to the regular Model
.
The mixin exposes the following methods:
assign(key, value)
- Add a new property to the model (or update an existing one)update(data)
- Update the model with an object (key/value)clone()
- Make a clone of the objectaddReference(key, value, options)
- Add a new reference to the model. Options is an object that requires the following properties:model
- The referenced model typetype
- Reference type (ReferenceType
enum)property
- (Optional) Property name for indirect references