mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
doc: update relations files with orphaned rows option (#7327)
This commit is contained in:
parent
5e2117cdff
commit
db7d85d4ff
@ -25,6 +25,7 @@ There are several options you can specify for relations:
|
||||
* `onDelete: "RESTRICT"|"CASCADE"|"SET NULL"` - specifies how foreign key should behave when referenced object is deleted
|
||||
* `primary: boolean` - Indicates whether this relation's column will be a primary column or not.
|
||||
* `nullable: boolean` - Indicates whether this relation's column is nullable or not. By default it is nullable.
|
||||
* `orphanedRowAction: "nullify" | "delete"` - When a child row is removed from its parent, determines if the child row should be orphaned (default) or deleted.
|
||||
|
||||
## Cascades
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
- `onDelete: "RESTRICT"|"CASCADE"|"SET NULL"` - 指定删除引用对象时外键的行为方式
|
||||
- `primary: boolean` - 指示此关系的列是否为主列。
|
||||
- `nullable: boolean` -指示此关系的列是否可为空。 默认情况下是可空。
|
||||
- `orphanedRowAction: "nullify" | "delete"` - 将子行从其父行中删除后,确定该子行是孤立的(默认值)还是删除的。
|
||||
|
||||
## 级联
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user