eee
This commit is contained in:
+3
-2
@@ -435,8 +435,9 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
|
|||||||
*/
|
*/
|
||||||
private function insert(): bool|static
|
private function insert(): bool|static
|
||||||
{
|
{
|
||||||
[$sql, $param] = SqlBuilder::builder(static::query())->insert($this->_attributes);
|
$query = static::query();
|
||||||
$lastId = $this->getConnection()->createCommand($sql, $param)->save();
|
$sql = SqlBuilder::builder($query)->insert($this->_attributes);
|
||||||
|
$lastId = $this->getConnection()->createCommand($sql, $query->params)->save();
|
||||||
if ($lastId === false) {
|
if ($lastId === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user