diff options
Diffstat (limited to 'framework/Data/ActiveRecord/TActiveRecord.php')
-rw-r--r-- | framework/Data/ActiveRecord/TActiveRecord.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php index 479f643b..1f482e6a 100644 --- a/framework/Data/ActiveRecord/TActiveRecord.php +++ b/framework/Data/ActiveRecord/TActiveRecord.php @@ -316,11 +316,14 @@ abstract class TActiveRecord extends TComponent //create and populate the object $obj = Prado::createComponent($type); $tableInfo = $this->getRecordGateway()->getRecordTableInfo($obj); + foreach($data as $name=>$value) + $obj->{$name} = $value; + /* foreach($tableInfo->getColumns()->getKeys() as $name) { if(isset($data[$name])) $obj->{$name} = $data[$name]; - } + }*/ $obj->_readOnly = $tableInfo->getIsView(); $this->getRecordManager()->getObjectStateRegistry()->registerClean($obj); return $obj; |