Commit 78f683d8 authored by zYne's avatar zYne

fixes #424

parent 5f7afb93
...@@ -1280,6 +1280,8 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable ...@@ -1280,6 +1280,8 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$join = ($delimeter == ':') ? 'INNER JOIN ' : 'LEFT JOIN '; $join = ($delimeter == ':') ? 'INNER JOIN ' : 'LEFT JOIN ';
$relation = $table->getRelation($name); $relation = $table->getRelation($name);
$localTable = $table;
$table = $relation->getTable(); $table = $relation->getTable();
$this->_aliasMap[$componentAlias] = array('table' => $table, $this->_aliasMap[$componentAlias] = array('table' => $table,
'parent' => $parent, 'parent' => $parent,
...@@ -1321,7 +1323,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable ...@@ -1321,7 +1323,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$queryPart .= ' ON ' . $localAlias $queryPart .= ' ON ' . $localAlias
. '.' . '.'
. $table->getColumnName($table->getIdentifier()) . $localTable->getIdentifier()
. ' = ' . ' = '
. $assocAlias . '.' . $relation->getLocal(); . $assocAlias . '.' . $relation->getLocal();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment