Example #1
0
 /**
  * Sets a component property to be null.
  * This method overrides the parent implementation by clearing
  * the specified attribute value.
  * @param string the property name or the event name
  * @since 1.0.1
  */
 public function __unset($name)
 {
     if (isset($this->getMetaData()->columns[$name])) {
         unset($this->_attributes[$name]);
     } else {
         if (isset($this->getMetaData()->relations[$name])) {
             unset($this->_related[$name]);
         } else {
             parent::__unset($name);
         }
     }
 }