Explorar o código

batch query result use ::model

alexlcdee %!s(int64=7) %!d(string=hai) anos
pai
achega
5c92a5fa84
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/components/BatchQueryResult.php

+ 3 - 1
src/components/BatchQueryResult.php

@@ -128,8 +128,10 @@ class BatchQueryResult implements \Iterator, \Countable
         $criteria->offset = $this->offset;
         $this->offset += $this->batchSize;
 
+        /** @var ActiveRecord $className */
         $className = get_class($this->ar);
-        return (new $className)->findAll($criteria);
+
+        return $className::model()->findAll($criteria);
     }
 
     /**