From 7389d82834d392b0f7ba4d01a69fd77072548bc1 Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Tue, 27 Nov 2007 02:50:56 +0000 Subject: [PATCH] fixes #547 --- lib/Doctrine/Query/Condition.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Query/Condition.php b/lib/Doctrine/Query/Condition.php index c1f56e299..e4cb12e18 100644 --- a/lib/Doctrine/Query/Condition.php +++ b/lib/Doctrine/Query/Condition.php @@ -74,8 +74,6 @@ abstract class Doctrine_Query_Condition extends Doctrine_Query_Part return '(' . $r . ')'; } - - /** * parses a literal value and returns the parsed value * @@ -100,7 +98,9 @@ abstract class Doctrine_Query_Condition extends Doctrine_Query_Part if ( ! is_numeric($a[0])) { // a component found - $value = $this->query->getTableAlias($a[0]). '.' . $a[1]; + $field = array_pop($a); + $reference = implode('.', $a); + $value = $this->query->getTableAlias($reference). '.' . $field; } } } else { @@ -109,4 +109,4 @@ abstract class Doctrine_Query_Condition extends Doctrine_Query_Part return $value; } -} +} \ No newline at end of file