public function delete(PropelPDO $oConnection = null) { $oImage = $this->getDocument(); if ($oImage) { $oImage->delete(); } return parent::delete($oConnection); }