summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorwei <>2007-05-04 08:39:34 +0000
committerwei <>2007-05-04 08:39:34 +0000
commitb0dc46eb15079ca853961c835280dcc8aabc098d (patch)
tree4c58555dfc9e680095a32c159ec95b7b3077f577 /framework
parent8708f7e88e423b44ea4b3b8fff14f055d2b5c4ac (diff)
minor update
Diffstat (limited to 'framework')
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php2
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php2
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php
index d70f911b..5c180c12 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php
@@ -106,7 +106,7 @@ class TActiveRecordHasMany extends TActiveRecordRelation
{
foreach($fkeys as $fKey => $srcKey)
$fkObjects[$i]->{$fKey} = $source->{$srcKey};
- $success = $success && $fkObjects[$i]->save();
+ $success = $fkObjects[$i]->save() && $success;
}
}
}
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php
index 2dee2bcd..e83ca37f 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php
@@ -307,7 +307,7 @@ class TActiveRecordHasManyAssociation extends TActiveRecordRelation
for($i=0;$i<$total;$i++)
{
if($registry->shouldPersistObject($fkObjects[$i]))
- $success = $success && $fkObjects[$i]->save();
+ $success = $fkObjects[$i]->save() && $success;
}
return $this->updateAssociationTable($obj, $fkObjects, $builder) && $success;
}
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php
index e601eb53..12f2a874 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php
@@ -193,7 +193,7 @@ class TActiveRecordRelationContext
if(!empty($obj->{$property}))
{
$context = new self($this->getSourceRecord(),$property);
- $success = $success && $context->getRelationHandler()->updateAssociatedRecords();
+ $success = $context->getRelationHandler()->updateAssociatedRecords() && $success;
}
}
}