DataView: query instantiation is up to the backend

refs #7635
This commit is contained in:
Thomas Gelf 2014-11-11 15:49:27 +01:00
parent 11f587aa09
commit 1557410b72
1 changed files with 1 additions and 2 deletions

View File

@ -44,8 +44,7 @@ abstract class DataView implements Browsable, Countable, Filterable, Sortable
public function __construct(ConnectionInterface $connection, array $columns = null)
{
$this->connection = $connection;
$queryClass = $connection->getQueryClass($this->getQueryName());
$this->query = new $queryClass($this->connection->getResource(), $columns);
$this->query = $connection->query($this->getQueryName(), $columns);
$this->filter = Filter::matchAll();
$this->init();
}