summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php
diff options
context:
space:
mode:
authorwei <>2007-05-04 08:37:12 +0000
committerwei <>2007-05-04 08:37:12 +0000
commit8708f7e88e423b44ea4b3b8fff14f055d2b5c4ac (patch)
treef468f8990c7675089f804914453ba994d0c1be30 /framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php
parentc1bddf3826ec570ea4c58d7a56c410ae54d26508 (diff)
Add saving/updating ActiveRecord relationships.
Diffstat (limited to 'framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php')
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php b/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php
index 46609095..4dc9743f 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php
@@ -95,7 +95,9 @@ abstract class TActiveRecordRelation
if($fkeys['table']===$matchingTableName)
return $fkeys['keys'];
}
- throw new TActiveRecordException('no fk defined for '.$tableInfo->getTableFullName());
+ $matching = $gateway->getRecordTableInfo($matchesRecord)->getTableFullName();
+ throw new TActiveRecordException('ar_relations_missing_fk',
+ $tableInfo->getTableFullName(), $matching);
}
/**
@@ -189,6 +191,10 @@ abstract class TActiveRecordRelation
$prop = $this->getContext()->getProperty();
$source->{$prop} = isset($collections[$hash]) ? $collections[$hash] : array();
}
+
+ public function updateAssociatedRecords()
+ {
+ }
}
?> \ No newline at end of file