We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab0c20a commit 812f76aCopy full SHA for 812f76a
src/Model.php
@@ -165,7 +165,10 @@ public static function map($field = 'id', $filters = []) {
165
if (!$data) return [];
166
167
return array_map(function($row) use ($field) {
168
- return is_array($row) ? $row[$field] : $row->{$field};
+ $value = is_array($row) ? $row[$field] : $row->{$field};
169
+ self::_set_type($field, $value);
170
+
171
+ return $value;
172
}, $data);
173
}
174
@@ -421,7 +424,7 @@ public function to_array($get_fields = null) {
421
424
422
425
foreach ($properties as $field => $value) {
423
426
if (!$get_fields || ($get_fields && in_array($field, $get_fields))) {
- $this->_set_type($field, $value);
427
428
$result[$field] = $value;
429
430
0 commit comments