RepositoryQuery: getQuery() might be called during prepareQueryColumns()

This commit is contained in:
Johannes Meyer 2015-05-28 14:26:48 +02:00
parent 08f8fe6f49
commit fd931e4232
1 changed files with 2 additions and 4 deletions

View File

@ -77,10 +77,8 @@ class RepositoryQuery implements QueryInterface, Iterator
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;
}