fix(tree-collection): onDelete: CASCADE

This commit is contained in:
chenos 2023-03-17 15:28:53 +08:00
parent 18a75e096c
commit 05ed569d21

View File

@ -27,6 +27,7 @@ export const tree: ICollectionTemplate = {
name: 'parent', name: 'parent',
foreignKey: 'parentId', foreignKey: 'parentId',
treeParent: true, treeParent: true,
onDelete: 'CASCADE',
uiSchema: { uiSchema: {
title: '{{t("Parent")}}', title: '{{t("Parent")}}',
'x-component': 'RecordPicker', 'x-component': 'RecordPicker',
@ -46,6 +47,7 @@ export const tree: ICollectionTemplate = {
name: 'children', name: 'children',
foreignKey: 'parentId', foreignKey: 'parentId',
treeChildren: true, treeChildren: true,
onDelete: 'CASCADE',
uiSchema: { uiSchema: {
title: '{{t("Children")}}', title: '{{t("Children")}}',
'x-component': 'RecordPicker', 'x-component': 'RecordPicker',