From adc870d2e5811aa9690335c606b20308bd28e98e Mon Sep 17 00:00:00 2001 From: zYne Date: Sat, 26 May 2007 17:04:41 +0000 Subject: [PATCH] old relation adapter layer now supports tree relations --- lib/Doctrine/Table.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index ab8e39dc9..115ae4df8 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -477,7 +477,11 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $e = explode('.', $args[1]); if (in_array($e[0], $classes)) { - $options['local'] = $e[1]; + if ($options['type'] >= Doctrine_Relation::MANY) { + $options['foreign'] = $e[1]; + } else { + $options['local'] = $e[1]; + } } else { $e2 = explode(' as ', $args[0]); if ($e[0] !== $e2[0] && ( ! isset($e2[1]) || $e[0] !== $e2[1])) {