fix: [organisations] Make sure to cascade deletion calls

pull/35/head
mokaddem 2020-11-30 13:54:36 +01:00
parent fec6f817f6
commit 7b393e58aa
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ class OrganisationsTable extends AppTable
$this->hasMany(
'EncryptionKeys',
[
'dependent' => true,
'foreignKey' => 'owner_id',
'conditions' => ['owner_type' => 'organisation']
]
@ -30,6 +31,7 @@ class OrganisationsTable extends AppTable
$this->hasMany(
'MetaFields',
[
'dependent' => true,
'foreignKey' => 'parent_id',
'conditions' => ['scope' => 'organisation']
]