Commit 993963bb by Qiang Xue

reset batch query result when rewinding.

parent 5474300c
......@@ -108,6 +108,7 @@ class BatchQueryResult extends Object implements \Iterator
{
if ($this->_batch === null || !$this->each || $this->each && next($this->_batch) === false) {
$this->_batch = $this->fetchData();
reset($this->_batch);
}
if ($this->each) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment