diff options
| -rw-r--r-- | build.xml | 6 | ||||
| -rw-r--r-- | framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php | 4 | ||||
| -rw-r--r-- | framework/Data/ActiveRecord/TActiveRecordGateway.php | 19 | 
3 files changed, 16 insertions, 13 deletions
| @@ -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];
  	}
 | 
