Skip to content

Commit

Permalink
RepositoryQuery: getQuery() might be called during prepareQueryColumns()
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed May 28, 2015
1 parent 08f8fe6 commit fd931e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions library/Icinga/Repository/RepositoryQuery.php
Expand Up @@ -77,10 +77,8 @@ public function getQuery()
public function from($target, array $columns = null)
{
$target = $this->repository->requireTable($target, $this);
$this->query = $this->repository
->getDataSource()
->select()
->from($target, $this->prepareQueryColumns($target, $columns));
$this->query = $this->repository->getDataSource()->select()->from($target);
$this->query->columns($this->prepareQueryColumns($target, $columns));
$this->target = $target;
return $this;
}
Expand Down

0 comments on commit fd931e4

Please sign in to comment.