From 84a97f98ed4d68275ef19b30492b33193c4e3145 Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Sun, 25 Nov 2007 21:39:39 +0000 Subject: [PATCH] Fixes #618 --- lib/Doctrine/Import/Schema.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/Doctrine/Import/Schema.php b/lib/Doctrine/Import/Schema.php index b7c47b01b..98a810b5d 100644 --- a/lib/Doctrine/Import/Schema.php +++ b/lib/Doctrine/Import/Schema.php @@ -212,24 +212,7 @@ class Doctrine_Import_Schema */ public function getRelations($properties) { - $all_relations = isset($this->_relations[$properties['className']]) ? $this->_relations[$properties['className']]:array(); - - // This is for checking for duplicates between alias-relations and a auto-generated relations to ensure the result set of unique relations - $exist_relations = array(); - $unique_relations = array(); - foreach ($all_relations as $relation) { - if (!in_array($relation['class'], $exist_relations)) { - $exist_relations[] = $relation['class']; - $unique_relations = array_merge($unique_relations, array($relation['alias'] => $relation)); - } else { - // check to see if this relationship is not autogenerated, if it's not, then the user must have explicitly declared it - if (!isset($relation['autogenerated']) || $relation['autogenerated'] != true) { - $unique_relations = array_merge($unique_relations, array($relation['alias'] => $relation)); - } - } - } - - return $unique_relations; + return isset($this->_relations[$properties['className']]) ? $this->_relations[$properties['className']]:array(); } /**