summaryrefslogtreecommitdiff
path: root/framework/Data/SqlMap/Statements
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/SqlMap/Statements')
-rw-r--r--framework/Data/SqlMap/Statements/TMappedStatement.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/Data/SqlMap/Statements/TMappedStatement.php b/framework/Data/SqlMap/Statements/TMappedStatement.php
index c100e386..e76a37df 100644
--- a/framework/Data/SqlMap/Statements/TMappedStatement.php
+++ b/framework/Data/SqlMap/Statements/TMappedStatement.php
@@ -560,7 +560,9 @@ class TMappedStatement extends TComponent implements IMappedStatement
$obj = $this->fillResultClass($resultClass, $row, $resultObject);
else
$obj = $this->fillDefaultResultMap(null, $row, $resultObject);
-
+ if(class_exists('TActiveRecord',false) && $obj instanceof TActiveRecord)
+ //Create a new clean active record.
+ $obj=TActiveRecord::createRecord(get_class($obj),$obj);
return $obj;
}