1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

Added extra logic to getRootAlias() so it only calles getSql() if _aliasMap is not present already

This commit is contained in:
Jonathan.Wage 2007-08-14 18:25:06 +00:00
parent b9a3e0cd20
commit f123a7cdcd

View file

@ -179,8 +179,11 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
*/ */
public function getRootAlias() public function getRootAlias()
{ {
$this->getSql(); if( !$this->_aliasMap )
{
$this->getSql();
}
reset($this->_aliasMap); reset($this->_aliasMap);
return key($this->_aliasMap); return key($this->_aliasMap);