diff --git a/lib/Doctrine/Hydrate.php b/lib/Doctrine/Hydrate.php index 9041b3fb5..6c5037af5 100644 --- a/lib/Doctrine/Hydrate.php +++ b/lib/Doctrine/Hydrate.php @@ -179,6 +179,8 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable */ public function getRootAlias() { + $this->getSql(); + reset($this->_aliasMap); return key($this->_aliasMap);