? ( $DB->quoteIdentifier($this->tableName()) . '.' . $DB->quoteIdentifier($k) )
: "{$this->tableName()}.{$k}";
-
+
if (is_object($this->$k) && is_a($this->$k,'DB_DataObject_Cast')) {
$dbtype = $DB->dsn["phptype"];
$joinType = strtoupper($joinType);
// we default to joining as the same name (this is remvoed later..)
+ $quoteIdentifiers = !empty($_DB_DATAOBJECT['CONFIG']['quote_identifiers']);
+
if ($joinAs === false) {
$joinAs = $obj->tableName();
}
+ $joinAs = $quoteIdentifiers ? $DB->quoteIdentifier($joinAs) : $joinAs;
- $quoteIdentifiers = !empty($_DB_DATAOBJECT['CONFIG']['quote_identifiers']);
$options = $_DB_DATAOBJECT['CONFIG'];
// not sure how portable adding database prefixes is..
$table = $this->tableName();
if ($quoteIdentifiers) {
- $joinAs = $DB->quoteIdentifier($joinAs);
+
$table = $DB->quoteIdentifier($table);
$ofield = (is_array($ofield)) ? array_map(array($DB, 'quoteIdentifier'), $ofield) : $DB->quoteIdentifier($ofield);
$tfield = (is_array($tfield)) ? array_map(array($DB, 'quoteIdentifier'), $tfield) : $DB->quoteIdentifier($tfield);