summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-04-15 08:34:36 +0200
committerFabio Bas <ctrlaltca@gmail.com>2014-04-15 08:34:36 +0200
commit3abca1f10ace63b2daa93870f17049c047b53abe (patch)
tree2a45933536d6a8f522b3ae656b8b8afd584d56d1 /framework/Data
parent7d9f4f21a1339db1e997c34609f60c471371faa1 (diff)
Fix #519
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php
index cc9bc01d..94826e03 100644
--- a/framework/Data/Common/Mysql/TMysqlMetaData.php
+++ b/framework/Data/Common/Mysql/TMysqlMetaData.php
@@ -76,6 +76,9 @@ class TMysqlMetaData extends TDbMetaData
{
list($schemaName,$tableName) = $this->getSchemaTableName($table);
$find = $schemaName===null ? "`{$tableName}`" : "`{$schemaName}`.`{$tableName}`";
+ $colCase = $this->getDbConnection()->getColumnCase();
+ if($colCase != TDbColumnCaseMode::Preserved)
+ $this->getDbConnection()->setColumnCase('Preserved');
$this->getDbConnection()->setActive(true);
$sql = "SHOW FULL FIELDS FROM {$find}";
$command = $this->getDbConnection()->createCommand($sql);
@@ -88,6 +91,8 @@ class TMysqlMetaData extends TDbMetaData
}
if($index===0)
throw new TDbException('dbmetadata_invalid_table_view', $table);
+ if($colCase != TDbColumnCaseMode::Preserved)
+ $this->getDbConnection()->setColumnCase($colCase);
return $tableInfo;
}