diff --git a/src/db/BaseQuery.php b/src/db/BaseQuery.php index 7685935d..c91ec43e 100644 --- a/src/db/BaseQuery.php +++ b/src/db/BaseQuery.php @@ -416,6 +416,11 @@ public function column(string | array $field, string $key = '', bool $useModelAt $this->result($item); return $item; } + + if (is_array($field) && 1 === count($field)) { + $field = current($field); + } + $array[$field] = $item; if ($this->model && $useModelAttr) { if (!empty($this->options['json'])) {