From 3c6eb6003754b03057dd4f38e9fd3ee1a96f7cbd Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Mon, 8 Oct 2007 18:46:38 +0000 Subject: [PATCH] Fixes for auto completing relationships. --- lib/Doctrine/Import/Schema.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Import/Schema.php b/lib/Doctrine/Import/Schema.php index 9c1a665f9..5e39c7612 100644 --- a/lib/Doctrine/Import/Schema.php +++ b/lib/Doctrine/Import/Schema.php @@ -241,12 +241,14 @@ class Doctrine_Import_Schema if( isset($this->relations[$relation['class']]) && is_array($this->relations[$relation['class']]) ) { foreach($this->relations[$relation['class']] as $otherRelation) { - if(isset($otherRelation['refClass']) && $otherRelation['refClass']==$className) // skip fully defined m2m relationships - return; + // skip fully defined m2m relationships + if(isset($otherRelation['refClass']) && $otherRelation['refClass'] == $className) { + continue(2); + } } - } else { - $this->relations[$relation['class']][$className] = $newRelation; } + + $this->relations[$relation['class']][$className] = $newRelation; } } }