public function removeTag($question, $tag) { $c = new Criteria(); $c->add(QuestionTagPeer::QUESTION_ID, $question->getId()); $c->add(QuestionTagPeer::USER_ID, $this->getId()); $c->add(QuestionTagPeer::NORMALIZED_TAG, Tag::normalize($tag)); QuestionTagPeer::doDelete($c); }
public function delete($con = null) { if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(QuestionTagPeer::DATABASE_NAME); } try { $con->begin(); QuestionTagPeer::doDelete($this, $con); $this->setDeleted(true); $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } }