. */ Doctrine::autoload('Doctrine_Query_Part'); /** * Doctrine_Query * * @package Doctrine * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @category Object Relational Mapping * @link www.phpdoctrine.com * @since 1.0 * @version $Revision$ * @author Konsta Vesterinen */ class Doctrine_Query_Set extends Doctrine_Query_Part { public function parse($dql) { preg_match_all("/[a-z0-9_]+\.[a-z0-9_]+[\.[a-z0-9]+]*/i", $dql, $m); if (isset($m[0])) { foreach ($m[0] as $part) { $e = explode('.', trim($part)); $field = array_pop($e); $reference = implode('.', $e); $alias = $this->query->getTableAlias($reference); $map = $this->query->getAliasDeclaration($reference); $dql = str_replace($part, $map['table']->getColumnName($field), $dql); } } return $dql; } }