Skip to content

Commit

Permalink
Merge pull request #1014 from madisoft/fix-qb-management-issue
Browse files Browse the repository at this point in the history
fix error in displaying a page beyond the last one with a custom QB
  • Loading branch information
DonCallisto authored Jul 10, 2018
2 parents 689db82 + f911907 commit 78e3bed
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 @@ -365,10 +365,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 78e3bed

Please sign in to comment.