*/ class Mage_Downloadable_Model_Link_Purchased extends Mage_Core_Model_Abstract { /** * Enter description here... * */ protected function _construct() { $this->_init('downloadable/link_purchased'); parent::_construct(); } /** * Check order id * * @return Mage_Core_Model_Abstract */ public function _beforeSave() { if (null == $this->getOrderId()) { throw new Exception( Mage::helper('downloadable')->__('Order id cannot be null')); } return parent::_beforeSave(); } }