Skip to content

Commit

Permalink
Merge pull request #84 from zoul0813/feature/newCollection
Browse files Browse the repository at this point in the history
Update to use `$this->getModel()->newCollection($items)`

Close #83
  • Loading branch information
baopham authored Aug 18, 2017
2 parents a53ebaf + eb42bef commit 96b785f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DynamoDbQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ protected function getAll($columns = [], $limit = -1, $use_iterator = true)
if ($this->conditionsAreExactSearch()) {
$item = $this->find($conditionValue, $columns);

return new Collection([$item]);
return $this->getModel()->newCollection([$item]);
}
}

Expand Down Expand Up @@ -579,7 +579,7 @@ protected function getAll($columns = [], $limit = -1, $use_iterator = true)
$results[] = $model;
}

return new Collection($results);
return $this->getModel()->newCollection($results);
}

protected function buildExpressionQuery()
Expand Down

0 comments on commit 96b785f

Please sign in to comment.