From 15db4bd5356b99dbf9369e6b035cd01f3d45e39d Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 25 Jun 2007 21:36:45 +0000 Subject: [PATCH] --- lib/Doctrine/Relation/Parser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Relation/Parser.php b/lib/Doctrine/Relation/Parser.php index 08699bf73..8e673ccab 100644 --- a/lib/Doctrine/Relation/Parser.php +++ b/lib/Doctrine/Relation/Parser.php @@ -174,7 +174,7 @@ class Doctrine_Relation_Parser } if ($recursive) { $this->getRelations(); - + return $this->getRelation($alias, false); } else { throw new Doctrine_Table_Exception('Unknown relation alias ' . $alias); @@ -328,6 +328,10 @@ class Doctrine_Relation_Parser $def['foreign'] = $def['table']->getIdentifier(); $def['localKey'] = true; } + } else { + if ($def['local'] !== $this->_table->getIdentifier()) { + $def['localKey'] = true; + } } } else { if (isset($def['foreign'])) {