This commit is contained in:
2021-03-29 17:29:39 +08:00
parent c112fc839c
commit 9e54e20dae
6 changed files with 512 additions and 496 deletions
+1
View File
@@ -52,6 +52,7 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
* @param $query
* @param array $array
* @param null $model
* @throws Exception
*/
public function __construct($query, array $array = [], $model = null)
{
+2 -1
View File
@@ -157,7 +157,8 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
*/
public function createAnnotation()
{
$annotation = Snowflake::app()->getAttributes();
$annotation = Snowflake::getAnnotation();
$annotation->injectProperty($this);
$methods = $annotation->getMethods(get_called_class());
foreach ($methods as $method => $attributes) {
foreach ($attributes as $attribute) {