/** * @see Doctrine_Connection_UnitOfWork::_collectDeletions() copy&past from * * @param Doctrine_Record $record * @param array $definitions * @return null */ private function collect(Doctrine_Record $record, &$definitions) { if (!$record->exists()) { return; } if (!$record->getTable()->hasTemplate(sfCacheTaggingToolkit::TEMPLATE_NAME)) { return; } # delete definitions if ($this->tagNamesToDelete === $definitions) { $definitions[$record->getOid()] = $record->obtainTagName(); $this->cascade($record); } else { # do not call cascade - due to SET NULL only updates columns # do not add tag, if its already on deletion list if (!array_key_exists($record->getOid(), $this->tagNamesToDelete)) { $definitions[$record->getOid()] = $record->obtainTagName(); } } }