[limb-svn] r7045 - 3.x/trunk/limb/active_record/src
svn at limb-project.com
svn at limb-project.com
Tue May 27 13:23:02 MSD 2008
Author: serega
Date: 2008-05-27 13:23:02 +0400 (Tue, 27 May 2008)
New Revision: 7045
URL: http://fisheye.limb-project.com/changelog/limb/?cs=7045
Modified:
3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
Log:
-- reverted back __sleep() and __wakeup() methods since objects take mush more space in cache with new implementation
Modified: 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
===================================================================
--- 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-05-27 07:55:49 UTC (rev 7044)
+++ 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-05-27 09:23:02 UTC (rev 7045)
@@ -2177,8 +2177,21 @@
{
$toolkit = lmbToolkit :: instance();
$this->_db_conn = $toolkit->getDbConnectionByDsn($this->_db_conn_dsn);
+
+ $this->_db_meta_info = $toolkit->getActiveRecordMetaInfo($this, $this->_db_conn);
+ $this->_db_table_fields = $this->_db_meta_info->getDbColumnsNames();
+
+ $this->_db_table = $this->_db_meta_info->getDbTable();
+ $this->_db_table->setPrimaryKeyName($this->_primary_key_name);
+ $this->_db_table_name = $this->_db_table->getTableName();
}
-
+
+ function __sleep()
+ {
+ $vars = array_keys(get_object_vars($this));
+ $vars = array_diff($vars, array('_db_conn', '_db_table', '_db_meta_info'));
+ return $vars;
+ }
}
More information about the limb-svn
mailing list