fix: [organisations] Make sure to cascade deletion calls
parent
fec6f817f6
commit
7b393e58aa
|
@ -23,6 +23,7 @@ class OrganisationsTable extends AppTable
|
||||||
$this->hasMany(
|
$this->hasMany(
|
||||||
'EncryptionKeys',
|
'EncryptionKeys',
|
||||||
[
|
[
|
||||||
|
'dependent' => true,
|
||||||
'foreignKey' => 'owner_id',
|
'foreignKey' => 'owner_id',
|
||||||
'conditions' => ['owner_type' => 'organisation']
|
'conditions' => ['owner_type' => 'organisation']
|
||||||
]
|
]
|
||||||
|
@ -30,6 +31,7 @@ class OrganisationsTable extends AppTable
|
||||||
$this->hasMany(
|
$this->hasMany(
|
||||||
'MetaFields',
|
'MetaFields',
|
||||||
[
|
[
|
||||||
|
'dependent' => true,
|
||||||
'foreignKey' => 'parent_id',
|
'foreignKey' => 'parent_id',
|
||||||
'conditions' => ['scope' => 'organisation']
|
'conditions' => ['scope' => 'organisation']
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue