这家伙有点懒,还没写个性签名!
采纳了一个明显错误的答案……
那段时间我还没用YII,只是追踪进去看是看到 $this->getIsNewRecord() 。误导了楼主了
追踪代码是:true 插入 false 更新
if ($this->getIsNewRecord()) { return $this->insert($runValidation, $attributeNames); } else { return $this->update($runValidation, $attributeNames) !== false; }