/** * Deletes row. Primary key value must be set before this function is called */ public function delete() { if ($this->isPrimaryKeyEmpty()) { throw new Gpf_Exception("Could not delete Row. Primary key values are empty"); } $this->load(); if ($this->getFileId() != "") { try { $file = new Gpf_Db_File(); $file->setFileId($this->getFileId()); $file->removeReference(); } catch (Gpf_DbEngine_Driver_Mysql_SqlException $e) { } } return parent::delete(); }