*/
public $sqlJoins = '';
+ /**
+ * enables the automatic usage of the qualified shorthand
+ * @var boolean
+ */
+ public $useQualifiedShorthand = true;
+
/**
* sql conditions
* @var wcf\system\database\util\PreparedStatementConditionBuilder
return;
}
- $sql = "SELECT ".(!empty($this->sqlSelects) ? $this->sqlSelects.',' : '')."
- ".$this->getDatabaseTableAlias().".*
+ $sql = "SELECT ".(!empty($this->sqlSelects) ? $this->sqlSelects.($this->useQualifiedShorthand ? ',' : '') : '')."
+ ".($this->useQualifiedShorthand ? $this->getDatabaseTableAlias().'.*' : '')."
FROM ".$this->getDatabaseTableName()." ".$this->getDatabaseTableAlias()."
".$this->sqlJoins."
WHERE ".$this->getDatabaseTableAlias().".".$this->getDatabaseTableIndexName()." IN (?".str_repeat(',?', count($this->objectIDs) - 1).")
$this->objects = $statement->fetchObjects(($this->objectClassName ?: $this->className));
}
else {
- $sql = "SELECT ".(!empty($this->sqlSelects) ? $this->sqlSelects.',' : '')."
- ".$this->getDatabaseTableAlias().".*
+ $sql = "SELECT ".(!empty($this->sqlSelects) ? $this->sqlSelects.($this->useQualifiedShorthand ? ',' : '') : '')."
+ ".($this->useQualifiedShorthand ? $this->getDatabaseTableAlias().'.*' : '')."
FROM ".$this->getDatabaseTableName()." ".$this->getDatabaseTableAlias()."
".$this->sqlJoins."
".$this->getConditionBuilder()->__toString()."