Commit d8f35ee0 authored by pookey's avatar pookey

fixes #227

parent f84fce2e
...@@ -196,6 +196,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate { ...@@ -196,6 +196,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate {
$e = explode(".", $componentName); $e = explode(".", $componentName);
$currPath = ''; $currPath = '';
$table = null;
foreach($e as $k => $component) { foreach($e as $k => $component) {
$currPath .= '.'.$component; $currPath .= '.'.$component;
...@@ -207,7 +208,12 @@ class Doctrine_RawSql extends Doctrine_Hydrate { ...@@ -207,7 +208,12 @@ class Doctrine_RawSql extends Doctrine_Hydrate {
else else
$alias = $tableAlias; $alias = $tableAlias;
if ($table) {
$t_name = $table->getAliasName($component);
$table = $this->connection->getTable($t_name);
} else {
$table = $this->connection->getTable($component); $table = $this->connection->getTable($component);
}
$this->tables[$alias] = $table; $this->tables[$alias] = $table;
$this->fetchModes[$alias] = Doctrine::FETCH_IMMEDIATE; $this->fetchModes[$alias] = Doctrine::FETCH_IMMEDIATE;
$this->tableAliases[$currPath] = $alias; $this->tableAliases[$currPath] = $alias;
......
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