CC-5896: Store cloud files in separate table, inherited from cc_files

Added delete on cascade for cloud files
This commit is contained in:
drigato 2014-07-28 16:03:57 -04:00
parent f6aa2e5a3b
commit 6fa7ddba9a
6 changed files with 12 additions and 9 deletions

View file

@ -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;
}
}