改名
This commit is contained in:
+1
-5
@@ -592,17 +592,13 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
$condition = [$this->getPrimary() => $this->getPrimaryValue()];
|
$condition = [$this->getPrimary() => $this->getPrimaryValue()];
|
||||||
}
|
}
|
||||||
$generate = SqlBuilder::builder(static::query()->where($condition))->update($param);
|
$generate = SqlBuilder::builder(static::query()->where($condition))->update($param);
|
||||||
var_dump($generate);
|
|
||||||
if (is_bool($generate)) {
|
if (is_bool($generate)) {
|
||||||
return $generate;
|
return $generate;
|
||||||
}
|
}
|
||||||
$command = $this->getConnection()->createCommand($generate[0], $generate[1]);
|
$command = $this->getConnection()->createCommand($generate[0], $generate[1]);
|
||||||
if ($o = $command->save(false, $this)) {
|
if ($command->save(false, $this)) {
|
||||||
var_dump($o);
|
|
||||||
return $this->refresh()->afterSave($fields, $param);
|
return $this->refresh()->afterSave($fields, $param);
|
||||||
}
|
}
|
||||||
|
|
||||||
var_dump(false);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user