diff --git a/Grid/Source/Entity.php b/Grid/Source/Entity.php index 6d5a606e..78cc0f99 100644 --- a/Grid/Source/Entity.php +++ b/Grid/Source/Entity.php @@ -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());