eee
This commit is contained in:
+1
-1
@@ -436,7 +436,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
|
|||||||
private function insert(): bool|static
|
private function insert(): bool|static
|
||||||
{
|
{
|
||||||
$sql = SqlBuilder::builder($query = static::query())->insert($this->_attributes);
|
$sql = SqlBuilder::builder($query = static::query())->insert($this->_attributes);
|
||||||
$lastId = $this->getConnection()->createCommand($sql, $query->params)->save();
|
$lastId = $this->getConnection()->createCommand($sql, $query->params)->exec();
|
||||||
if ($lastId === false) {
|
if ($lastId === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user