CC-5896: Store cloud files in separate table, inherited from cc_files
Added delete on cascade for cloud files
This commit is contained in:
parent
f6aa2e5a3b
commit
6fa7ddba9a
6 changed files with 12 additions and 9 deletions
|
@ -3405,10 +3405,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
|
||||
if ($this->cloudFilesScheduledForDeletion !== null) {
|
||||
if (!$this->cloudFilesScheduledForDeletion->isEmpty()) {
|
||||
foreach ($this->cloudFilesScheduledForDeletion as $cloudFile) {
|
||||
// need to save related object because we set the relation to null
|
||||
$cloudFile->save($con);
|
||||
}
|
||||
CloudFileQuery::create()
|
||||
->filterByPrimaryKeys($this->cloudFilesScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->cloudFilesScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue