new Model(data)
Create a new DynamicRecord.Model instance.
Parameters:
Name | Type | Description |
---|---|---|
data |
object | Object containing data for this instance of DynamicRecord.Model |
Members
-
data :object
-
The data contained in this instance. It is not kept in sync with the database automatically.
You should be directly modifying this object. When done and you wish to save the data to the database, call
save()
on the parent object instance.
Methods
-
destroy() → {Promise}
-
Delete the entry this instance links to. Clear the data property of this instance as well.
Returns:
Promise -
save() → {Promise}
-
Save the data in this instance to the database.
Returns:
Promise -
validate() → {boolean}
-
Validate the data in this instance conform to its schema.
Implementation not settled
Returns:
boolean