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.
可选createForeignKeyConstraints
createForeignKeyConstraints?:boolean
Indicates whether foreign key constraints will be created for join columns.
Can be used only for many-to-one and owner one-to-one relations.
Defaults to true.
可选default
default?:any
Default database value.
可选deferrable
deferrable?:DeferrableType
Indicate if foreign key constraints can be deferred.
可选eager
eager?:boolean
Indicates if this relation will be eagerly loaded.
When a parent is saved (with cascading but) without a child row that still exists in database, this will control what shall happen to them.
delete will remove these rows from database. nullify will remove the relation key.
skip will keep the relation intact. Removal of related item is only possible through its own repo.
可选persistence
persistence?:boolean
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.
可选primary
primary?:boolean
Indicates if this relation will be a primary key.
Can be used only for many-to-one and owner one-to-one relations.
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.