/** * Removes this object from datastore and sets delete attribute. * * @param Connection $con * @return void * @throws PropelException * @see BaseObject::setDeleted() * @see BaseObject::isDeleted() */ public function delete($con = null) { if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(WebEntryEventPeer::DATABASE_NAME); } try { $con->begin(); WebEntryEventPeer::doDelete($this, $con); $this->setDeleted(true); $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } }
/** * Delete WebEntry-Event * * @param string $webEntryEventUid Unique id of WebEntry-Event * * return void */ public function delete($webEntryEventUid) { try { //Verify data $this->throwExceptionIfNotExistsWebEntryEvent($webEntryEventUid, $this->arrayFieldNameForException["webEntryEventUid"]); //Set variables $arrayWebEntryEventData = $this->getWebEntryEvent($webEntryEventUid, true); //Delete WebEntry $this->deleteWebEntry($arrayWebEntryEventData["WEE_WE_UID"], $arrayWebEntryEventData["WEE_WE_TAS_UID"]); //Delete WebEntry-Event $criteria = new \Criteria("workflow"); $criteria->add(\WebEntryEventPeer::WEE_UID, $webEntryEventUid, \Criteria::EQUAL); $result = \WebEntryEventPeer::doDelete($criteria); } catch (\Exception $e) { throw $e; } }