Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX: Don't select *any* column() in DataQuery::initialiseQuery(); …

…leave that until finaliseQuery(). It shouldn't be necessary and just risks field collisions.
  • Loading branch information...
commit 5abf8cf0f3ffdebf4c9e2558d127bcb0056164e8 1 parent 8661164
Sam Minnée sminnee authored
Showing with 0 additions and 8 deletions.
  1. +0 −8 model/DataQuery.php
8 model/DataQuery.php
View
@@ -105,7 +105,6 @@ function initialiseQuery() {
}
$baseClass = array_shift($tableClasses);
- $select = array("\"$baseClass\".*");
// Build our intial query
$this->query = new SQLQuery(array());
@@ -116,7 +115,6 @@ function initialiseQuery() {
}
$this->query->from("\"$baseClass\"");
- $this->selectColumnsFromTable($this->query, $baseClass);
singleton($this->dataClass)->extend('augmentDataQueryCreation', $this->query, $this);
}
@@ -155,12 +153,6 @@ function getFinalisedQuery($queriedColumns = null) {
$tableNames = array_keys($tableClasses);
$baseClass = $tableNames[0];
- // Empty the existing select query of all non-generated selects (eg, random sorts and many-many-extrafields).
- // Maybe we should remove all fields that exist on this class instead?
- foreach ($query->select as $name => $column) {
- if (!is_numeric($name)) unset($query->select[$name]);
- }
-
// Iterate over the tables and check what we need to select from them. If any selects are made (or the table is
// required for a select)
foreach($tableClasses as $tableClass) {
Please sign in to comment.
Something went wrong with that request. Please try again.