Example #1
0
 public function updateByPk($pk, $attributes, $condition = "", $params = array())
 {
     if ($this->getIsAllowCache()) {
         $pk = is_array($pk) ? $pk : explode(",", $pk);
         foreach ($pk as $id) {
             $key = $this->getCacheKey($id);
             CacheUtil::rm($key);
         }
     }
     $counter = parent::updateByPk($pk, $attributes, $condition, $params);
     $this->afterSave();
     return $counter;
 }
 /**
  *
  * @param mixed $pk
  * @param array $attributes
  * @param string $condition
  * @param array $params
  * @return boolean 
  */
 public function updateByPk($pk, $attributes, $condition = '', $params = array())
 {
     if (CStubActiveRecord::isUnittests()) {
         return CallFactory::call($this, 'updateByPk');
     }
     return parent::updateByPk($pk, $attributes, $condition, $params);
 }