mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
added cascadesAll option
This commit is contained in:
parent
27b9dabefc
commit
83e89a1352
@ -121,12 +121,12 @@ export class RelationMetadata extends PropertyMetadata {
|
||||
|
||||
if (args.options.name)
|
||||
this._name = args.options.name;
|
||||
if (args.options.cascadeInsert)
|
||||
this.isCascadeInsert = args.options.cascadeInsert;
|
||||
if (args.options.cascadeUpdate)
|
||||
this.isCascadeUpdate = args.options.cascadeUpdate;
|
||||
if (args.options.cascadeRemove)
|
||||
this.isCascadeRemove = args.options.cascadeRemove;
|
||||
if (args.options.cascadeInsert || args.options.cascadeAll)
|
||||
this.isCascadeInsert = true;
|
||||
if (args.options.cascadeUpdate || args.options.cascadeAll)
|
||||
this.isCascadeUpdate = true;
|
||||
if (args.options.cascadeRemove || args.options.cascadeAll)
|
||||
this.isCascadeRemove = true;
|
||||
if (args.options.oldColumnName)
|
||||
this.oldColumnName = args.options.oldColumnName;
|
||||
if (args.options.nullable)
|
||||
|
||||
@ -10,6 +10,12 @@ export interface RelationOptions {
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
cascadeAll?: boolean;
|
||||
|
||||
/**
|
||||
* If set to true then it means that related object can be allowed to be inserted to the db.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user