summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/TActiveRecordStateRegistry.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/ActiveRecord/TActiveRecordStateRegistry.php')
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordStateRegistry.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecordStateRegistry.php b/framework/Data/ActiveRecord/TActiveRecordStateRegistry.php
index ef415b5e..691090dc 100644
--- a/framework/Data/ActiveRecord/TActiveRecordStateRegistry.php
+++ b/framework/Data/ActiveRecord/TActiveRecordStateRegistry.php
@@ -54,13 +54,13 @@ class TActiveRecordStateRegistry
* @param mixed row data fetched
* @return TActiveRecord cached object if found, null otherwise.
*/
- public function getCachedInstance($data)
+ public function getCachedInstance($data,$mustBeClean=true)
{
$key = $this->getObjectDataKey($data);
if(isset($this->_cachedObjects[$key]))
{
$obj = $this->_cachedObjects[$key];
- if($this->getIsCleanObject($obj))
+ if(!($mustBeClean && !$this->getIsCleanObject($obj)))
return $obj;
}
}