Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Indexable

[otherProps: string]: any

Index

Constructors

constructor

Properties

Protected model

model: any

Methods

belongsTo

getChildren

getChildrenAll

  • getChildrenAll(): void
  • Get recursively all descendant models from this model

    Returns void

Private getForeignKeyColumnName

  • getForeignKeyColumnName(): string

getParent

hasChildren

  • hasChildren(): boolean

Protected insert

  • insert(model?: any): number | string

isSaved

  • isSaved(): boolean

remove

  • remove(model?: any): number

save

  • save(model?: any): number | string

tableName

  • tableName(): string

Protected update

  • update(model?: any): number | string

Static create

  • create(pojo: Object, modelClass: any): Model
  • Factory for model instance creation

    Parameters

    • pojo: Object

      (plain old javascript object)

    • modelClass: any

    Returns Model

Static omitChildrenProps

  • omitChildrenProps(model: any): Model
  • Makes related models properties not enumerable Use: if a model is fetched with all related (or children) models when this model is saved an error is thrown due to properties containing related models are not original model properties This function can be used to "hide" (not enumerate) these props and save the model

    Parameters

    • model: any

      returns {Model}

    Returns Model

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc