protected static function doOnDeleteCascade(Criteria $criteria, Connection $con) { $affectedRows = 0; $objects = FakeForumPeer::doSelect($criteria, $con); foreach ($objects as $obj) { include_once 'plugins/sfSolrPlugin/test/bin/model/FakeForumI18n.php'; $c = new Criteria(); $c->add(FakeForumI18nPeer::ID, $obj->getId()); $affectedRows += FakeForumI18nPeer::doDelete($c, $con); } return $affectedRows; }
public function delete(PropelPDO $con = null) { foreach (sfMixer::getCallables('BaseFakeForumI18n:delete:pre') as $callable) { $ret = call_user_func($callable, $this, $con); if ($ret) { return; } } if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(FakeForumI18nPeer::DATABASE_NAME); } try { $con->begin(); FakeForumI18nPeer::doDelete($this, $con); $this->setDeleted(true); $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } foreach (sfMixer::getCallables('BaseFakeForumI18n:delete:post') as $callable) { call_user_func($callable, $this, $con); } }