Skip to content

Commit

Permalink
fix error in displaying a page beyond the last one with a custom QB
Browse files Browse the repository at this point in the history
  • Loading branch information
angelo committed Jul 10, 2018
1 parent d2c4f76 commit f911907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Grid/Source/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ public function initQueryBuilder(QueryBuilder $queryBuilder)
*/
protected function getQueryBuilder()
{
//If a custom QB has been provided, use that
//If a custom QB has been provided, use a copy of that one
//Otherwise create our own basic one
if ($this->queryBuilder instanceof QueryBuilder) {
$qb = $this->queryBuilder;
$qb = clone $this->queryBuilder;
} else {
$qb = $this->manager->createQueryBuilder($this->class);
$qb->from($this->class, $this->getTableAlias());
Expand Down

0 comments on commit f911907

Please sign in to comment.