From d39c697d0e839e299143584e83ba58263e19d2e7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 18 May 2015 14:01:17 +0200 Subject: [PATCH] Repository: QueryInterface is _not_ queryable anymore... refs #8826 --- library/Icinga/Repository/Repository.php | 2 +- library/Icinga/Repository/RepositoryQuery.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Repository/Repository.php b/library/Icinga/Repository/Repository.php index 58f199f1b..9a40a3d6f 100644 --- a/library/Icinga/Repository/Repository.php +++ b/library/Icinga/Repository/Repository.php @@ -19,7 +19,7 @@ use Icinga\Util\String; * */ abstract class Repository implements Selectable diff --git a/library/Icinga/Repository/RepositoryQuery.php b/library/Icinga/Repository/RepositoryQuery.php index 86527a66e..d70afd457 100644 --- a/library/Icinga/Repository/RepositoryQuery.php +++ b/library/Icinga/Repository/RepositoryQuery.php @@ -43,7 +43,6 @@ class RepositoryQuery implements QueryInterface public function __construct(Repository $repository) { $this->repository = $repository; - $this->query = $repository->getDataSource()->select(); } /** @@ -68,7 +67,10 @@ class RepositoryQuery implements QueryInterface */ public function from($target, array $columns = null) { - $this->query->from($target, $this->prepareQueryColumns($target, $columns)); + $this->query = $this->repository + ->getDataSource() + ->select() + ->from($target, $this->prepareQueryColumns($target, $columns)); $this->target = $target; return $this; }