This commit is contained in:
as2252258@163.com
2021-04-04 17:47:13 +08:00
parent 00c72d3f1b
commit 83c49c6049
+7 -1
View File
@@ -391,7 +391,13 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
*/
public function getAttributes(): array
{
return $this->_attributes;
$data = $this->_attributes;
foreach ($this->getAnnotation() as $key => $item) {
if (!isset($data[$key])) continue;
$data[$key] = $this->runAnnotation($key, $data[$key] ?? null);
}
return $data;
}
/**