Class: DBObjectEditTemplate

DBObjectEditTemplate


new DBObjectEditTemplate(name:, data:, uri: [, options])

Parameters:
Name Type Argument Description
name: String

valid DBObject name

data: Object

data set

uri: Object

[{route, method}] object if not POST @ '/api/'

options Object <optional>
Properties
Name Type Description
check: boolean

set to true to check if data from edited object match data

returnedProp: String

name of the property which contains the object / objectId

id: boolean

true => returns an ID only; false => return a full object

Source:

Methods


<protected> $compare()

Compare 'createdValue' with 'inputValue' handling special cases

Source:
Returns:
Type
boolean

execute()

Edit a new DBObject from class 'this._name' by calling the associated route

Source:
Returns:

promise wrapping the created DBObject

Type
Promise