Class: Category


new Category()

Category describes a category which can trigger on certain events (signals)

Name Type Description
name string

the category name

count string

how many categories are under this node

defs array

a list of allowed keyvalue definitions

parent string

the primary key of the parent category

modified Moment

the modified date of the category




Checks via the api if we can delete the Category document

inherited create(skipRead){promise}

Creates an object by the default api.create

Name Type Description

skips reading the response via _fromJson (false)

inherited delete(){promise}

Deletes an object by the default api.delete

inherited discardChanges(){promise}

Discards any changes made to the object from the previously loaded raw response or resets it when no old raw response was found

inherited existsInDb(){boolean}

Checks if the document exists in the database

inherited get(_fields){promise}

Gets an object by the default api.get

Name Type Description

inherited isDirty(){boolean}

Checks if the object needs to be saved We don't check any of the keyvalues (or comments, attachments) here


Checks if the object is empty, it never is


Checks if the category has any validation errors


Checks if name is valid

inherited reload(_fields){promise}

Reloads the object from db

Name Type Description

inherited reset(){promise}

Resets the object

inherited update(skipRead){promise}

Updates an object by the default api.update

Name Type Description

skips reading the response via _fromJson (false)