From 04f1a135cf56ea09d5f3bcdb1c6cd1ce7580614b Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Wed, 19 Sep 2007 21:08:23 +0000 Subject: [PATCH] Updated to auto complete other end of relationships. --- lib/Doctrine/Import/Schema.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Doctrine/Import/Schema.php b/lib/Doctrine/Import/Schema.php index 883f0dea5..623b7e8b4 100644 --- a/lib/Doctrine/Import/Schema.php +++ b/lib/Doctrine/Import/Schema.php @@ -120,7 +120,13 @@ abstract class Doctrine_Import_Schema // Fix the other end of the relations foreach($this->relations as $className => $relations) { foreach ($relations AS $alias => $relation) { + $newRelation = array(); + $newRelation['foreign'] = $relation['local']; + $newRelation['local'] = $relation['foreign']; + $newRelation['class'] = $className; + $newRelation['alias'] = $className; + $this->relations[$relation['class']][$className] = $newRelation; } } }