Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • EntitySchemaRelationOptions

Index

Properties

Optional cascade

cascade: boolean | ("insert" | "update" | "remove")[]

If set to true then it means that related object can be allowed to be inserted / updated / removed to the db. This is option a shortcut if you would like to set cascadeInsert, cascadeUpdate and cascadeRemove to true.

Optional default

default: any

Default database value.

Optional eager

eager: undefined | true | false

Indicates if this relation will be eagerly loaded.

Optional inverseSide

inverseSide: undefined | string

Inverse side of the relation.

Optional joinColumn

joinColumn: boolean | JoinColumnOptions

Join column options of this column. If set to true then it simply means that it has a join column.

Optional joinTable

Join table options of this column. If set to true then it simply means that it has a join table.

Optional lazy

lazy: undefined | true | false

Indicates if this relation will be lazily loaded.

Optional nullable

nullable: undefined | true | false

Indicates if relation column value can be nullable or not.

Optional onDelete

onDelete: OnDeleteType

Database cascade action on delete.

Optional onUpdate

onUpdate: OnUpdateType

Database cascade action on update.

Optional persistence

persistence: undefined | true | false

Indicates if persistence is enabled for the relation. By default its enabled, but if you want to avoid any changes in the relation to be reflected in the database you can disable it. If its disabled you can only change a relation from inverse side of a relation or using relation query builder functionality. This is useful for performance optimization since its disabling avoid multiple extra queries during entity save.

Optional primary

primary: undefined | true | false

Indicates if this relation will be a primary key. Can be used only for many-to-one and owner one-to-one relations.

target

target: Function | string

Indicates with which entity this relation is made.

Optional treeChildren

treeChildren: undefined | true | false

Indicates if this is a children (can be only one-to-many relation) relation in the tree tables.

Optional treeParent

treeParent: undefined | true | false

Indicates if this is a parent (can be only many-to-one relation) relation in the tree tables.

type

Type of relation. Can be one of the value of the RelationTypes class.

Generated using TypeDoc