diff options
author | wei <> | 2007-11-01 04:20:14 +0000 |
---|---|---|
committer | wei <> | 2007-11-01 04:20:14 +0000 |
commit | f6fac5cc2f679a6e93a39ea4127f58e438a583c5 (patch) | |
tree | 3098dc90cdde01ba6cece67c0b2c979de6ffa2d2 /framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php | |
parent | 6a0174448c793cb071e1e6d12f3da3a65eeb4e15 (diff) |
Refactored ActiveRecord: removed object registry, fixed relationship casing problems.
Diffstat (limited to 'framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php')
-rw-r--r-- | framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php index 8bc4362f..d6f86a9a 100644 --- a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php +++ b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php @@ -182,8 +182,9 @@ class TActiveRecordRelationContext public function updateAssociatedRecords($updateBelongsTo=false)
{
$success=true;
- foreach($this->_record->getRelations() as $property=>$relation)
+ foreach($this->_record->getRelations() as $data)
{
+ list($property, $relation) = $data;
$belongsTo = $relation[0]==TActiveRecord::BELONGS_TO;
if(($updateBelongsTo && $belongsTo) || (!$updateBelongsTo && !$belongsTo))
{
|