Constructor
(abstract) new NedbBaseDocument()
Methods
(async) getData(populateopt) → {Object}
Get the plain JavaScript object representation of a SuperCamo document instance.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
populate | Boolean | <optional> | true | Optional. Set this to true to return all referenced documents as objects within the parent object. |
- Type:
- Object
(async, static) create(dataObj, validateOnCreateopt) → {this}
Create a new instance of the model.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
dataObj | An object of data matching the model's schema. | |||
validateOnCreate | Boolean | <optional> | false | If you want the instance data to be validated when this function runs, set this to true. Otherwise, you have to save the instance into the database to trigger the validation step. |
An instance of the model.
- Type:
- this