/** * Delete Message-Event-Relation * * @param array $arrayCondition Conditions * * return void */ public function deleteWhere(array $arrayCondition) { try { //Delete $criteria = new \Criteria("workflow"); foreach ($arrayCondition as $key => $value) { if (is_array($value)) { $criteria->add($key, $value[0], $value[1]); } else { $criteria->add($key, $value, \Criteria::EQUAL); } } $result = \MessageEventRelationPeer::doDelete($criteria); } catch (\Exception $e) { throw $e; } }
/** * 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(MessageEventRelationPeer::DATABASE_NAME); } try { $con->begin(); MessageEventRelationPeer::doDelete($this, $con); $this->setDeleted(true); $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } }