This commit is contained in:
2021-02-23 16:20:19 +08:00
parent 87950f07da
commit 599cfc7d10
2 changed files with 8 additions and 3 deletions
+7 -2
View File
@@ -119,9 +119,14 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
{
$annotation = Snowflake::app()->getAttributes();
$this->_annotations = $annotation->getMethods(get_called_class());
$name = static::class;
$lists = $annotation->getPropertyAnnotation(get_called_class());
$this->_annotations = $annotation->getMethods($name);
$lists = $annotation->getProperty($name);
if (empty($lists)) {
return;
}
foreach ($lists as $name => $list) {
$this->{$name} = $list;
}