/** * Unset row field value * * @param string $columnName The column key. * @return Zend_Db_Table_Row_Abstract * @throws Zend_Db_Table_Row_Exception */ public function __unset($columnName) { try { parent::__unset($columnName); } catch (Zend_Db_Table_Row_Exception $e) { if (array_key_exists($columnName, $this->_related)) { unset($this->_related[$columnName]); } elseif (array_key_exists($columnName, $this->_virtual)) { unset($this->_virtual[$columnName]); } else { throw $e; } } return $this; }
/** * Overrides the magic unset method to support unsetting a foreign key object * attribute. If the requested attribute is not a foreign key object attribute, * it simply invokes the parent class method. * @param string $name The attribute name to unset. */ public function __unset($name) { if ($this->hasForeignKey($name)) { unset($this->_foreignObjects[$name]); } else { parent::__unset($columnName); } }