summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/ActiveRecord')
-rw-r--r--framework/Data/ActiveRecord/TActiveRecord.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php
index 0b892a8f..3ad94073 100644
--- a/framework/Data/ActiveRecord/TActiveRecord.php
+++ b/framework/Data/ActiveRecord/TActiveRecord.php
@@ -202,10 +202,8 @@ abstract class TActiveRecord extends TComponent
{
if($this->hasRelation($name) && !$this->canGetProperty($name))
{
- $name2=strtolower($name);
- if(!isset($this->_foreignObjects[$name2]))
- $this->fetchResultsFor($name2);
- return $this->_foreignObjects[$name2]===false?null:$this->_foreignObjects[$name2];
+ $this->fetchResultsFor($name);
+ return $this->$name;
}
return parent::__get($name);
}
@@ -221,7 +219,7 @@ abstract class TActiveRecord extends TComponent
public function __set($name,$value)
{
if($this->hasRelation($name) && !$this->canSetProperty($name))
- $this->_foreignObjects[strtolower($name)]=$value===null?false:$value;
+ $this->$name=$value;
else
parent::__set($name,$value);
}