Class: Entity

.Service. Entity


new Entity()

Entity class to handle ORM to a datasource

Note: Datasource property is required

Source:

Extends

  • Augmented.Model

Members


<static> collection

Properties:
Name Type Description
collection string

The collection for the datasource (if applicable)

Source:

<static> datasource

Properties:
Name Type Description
datasource Augmented.Service.DataSource

Datasource instance

Source:

<static> url

Properties:
Name Type Description
url string | function

The url for the datasource (if applicable)

Source:

Methods


<static> destroy Destroy the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> fetch Fetch the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> init Custom init method for the model (options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> initialize Initialize the model with needed wireing(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> save Save the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> sync Sync method to handle datasource functions for the model(method, options)

Parameters:
Name Type Description
method string

the operation to perform

options object

Any options to pass

Source:

<static> update Update the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> {any} query The query string to use for selection()

The query to use for the query - defaults to "id" selection

Source: