Default joinBaseTables implementation, can simplify simple queries

This commit is contained in:
Thomas Gelf 2013-08-20 22:57:06 +02:00 committed by Eric Lippmann
parent f3eedd919f
commit bd983c7478
1 changed files with 12 additions and 0 deletions

View File

@ -118,6 +118,18 @@ abstract class AbstractQuery extends Query
return array_keys($this->columnMap[$table]);
}
protected function joinBaseTables()
{
$table = array_shift(array_keys($this->columnMap));
$this->baseQuery = $this->db->select()->from(
array($table => $this->prefix . $table),
array()
);
$this->joinedVirtualTables = array($table => true);
}
protected function beforeCreatingCountQuery()
{
$this->applyAllFilters();