diff --git a/src/ActiveRecord.php b/src/ActiveRecord.php index 87346b9e3..bcdea8f2f 100644 --- a/src/ActiveRecord.php +++ b/src/ActiveRecord.php @@ -161,7 +161,7 @@ protected function insertInternal(array|null $properties = null): bool } $values = $this->newPropertyValues($properties); - $primaryKeys = $this->db()->createCommand()->insertWithReturningPks($this->tableName(), $values); + $primaryKeys = $this->db()->createCommand()->insertReturningPks($this->tableName(), $values); if ($primaryKeys === false) { return false;