From b0dc46eb15079ca853961c835280dcc8aabc098d Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 4 May 2007 08:39:34 +0000 Subject: minor update --- framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php | 2 +- .../Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php | 2 +- framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'framework/Data') 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; } } } -- cgit v1.2.3