summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwei <>2007-05-08 00:26:41 +0000
committerwei <>2007-05-08 00:26:41 +0000
commit7ff413dbb8050c90b4d78bd999065d4e4673891a (patch)
tree7bfd803f490702f9a4cf3372e3737a618551879c
parenteab6bb13b9efb3e1c6d725368368de4d74b00946 (diff)
minor changes
-rw-r--r--build.xml6
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php4
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordGateway.php19
3 files changed, 16 insertions, 13 deletions
diff --git a/build.xml b/build.xml
index 88be065f..d4cccf51 100644
--- a/build.xml
+++ b/build.xml
@@ -185,21 +185,21 @@
<target name="compact-db-sqlite" description="Sqlite Database" depends="compact-db">
<compact-package output="${build.compact.dir}/db-sqlite.php" strip="${compact-strip-comments}">
<filelist dir="framework/Data/Common/Sqlite"
- files="TSqliteMetaData.php,TSqliteTableColumn.php,TSqliteTableInfo.php" />
+ files="TSqliteCommandBuilder.php,TSqliteMetaData.php,TSqliteTableColumn.php,TSqliteTableInfo.php" />
</compact-package>
</target>
<target name="compact-db-mysql" description="Mysql Database" depends="compact-db">
<compact-package output="${build.compact.dir}/db-mysql.php" strip="${compact-strip-comments}">
<filelist dir="framework/Data/Common/Mysql"
- files="TMysqlMetaData.php,TMysqlTableColumn.php,TMysqlTableInfo.php" />
+ files="TMysqlCommandBuilder.php,TMysqlMetaData.php,TMysqlTableColumn.php,TMysqlTableInfo.php" />
</compact-package>
</target>
<target name="compact-db-pgsql" description="Pgsql Database" depends="compact-db">
<compact-package output="${build.compact.dir}/db-pgsql.php" strip="${compact-strip-comments}">
<filelist dir="framework/Data/Common/Pgsql"
- files="TPgsqlMetaData.php,TPgsqlTableColumn.php,TPgsqlTableInfo.php" />
+ files="TPgsqlCommandBuilder.php,TPgsqlMetaData.php,TPgsqlTableColumn.php,TPgsqlTableInfo.php" />
</compact-package>
</target>
diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php
index 34f8a592..e47670ca 100644
--- a/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php
+++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php
@@ -77,8 +77,8 @@ class TScaffoldListView extends TScaffoldBase
public function onPreRender($param)
{
parent::onPreRender($param);
- if(!$this->getPage()->getIsPostBack())
- $this->initializeSort();
+ //if(!$this->getPage()->getIsPostBack())
+ $this->initializeSort();
$this->loadRecordData();
}
diff --git a/framework/Data/ActiveRecord/TActiveRecordGateway.php b/framework/Data/ActiveRecord/TActiveRecordGateway.php
index 80ce40c0..e081e19c 100644
--- a/framework/Data/ActiveRecord/TActiveRecordGateway.php
+++ b/framework/Data/ActiveRecord/TActiveRecordGateway.php
@@ -93,21 +93,24 @@ class TActiveRecordGateway extends TComponent
$key = $connStr.$tableName;
if(!isset($this->_tables[$key]))
{
+ //call this first to ensure that unserializing the cache
+ //will find the correct driver dependent classes.
+ if(!isset($this->_meta[$connStr]))
+ {
+ Prado::using('System.Data.Common.TDbMetaData');
+ $this->_meta[$connStr] = TDbMetaData::getInstance($connection);
+ }
+
$tableInfo = null;
if(($cache=$this->getManager()->getCache())!==null)
$tableInfo = $cache->get($key);
- if($tableInfo===null)
+ if(empty($tableInfo))
{
- if(!isset($this->_meta[$connStr]))
- {
- Prado::using('System.Data.Common.TDbMetaData');
- $this->_meta[$connStr] = TDbMetaData::getInstance($connection);
- }
$tableInfo = $this->_meta[$connStr]->getTableInfo($tableName);
+ if($cache!==null)
+ $cache->set($key, $tableInfo);
}
$this->_tables[$key] = $tableInfo;
- if($cache!==null)
- $cache->set($key, $tableInfo);
}
return $this->_tables[$key];
}