diff --git a/lib/Doctrine/Hydrator/Graph.php b/lib/Doctrine/Hydrator/Graph.php index b227f3874..8578f4871 100644 --- a/lib/Doctrine/Hydrator/Graph.php +++ b/lib/Doctrine/Hydrator/Graph.php @@ -311,17 +311,11 @@ protected function _gatherRowData(&$data, &$cache, &$id, &$nonemptyComponents) $table = $this->_queryComponents[$cache[$key]['dqlAlias']]['table']; $fieldName = $table->getFieldName($last); $cache[$key]['fieldName'] = $fieldName; - - if (isset($this->_queryComponents[$cache[$key]['dqlAlias']]['agg_field'][$last])) { - $fieldName = $this->_queryComponents[$cache[$key]['dqlAlias']]['agg_field'][$last]; - } - if ($table->isIdentifier($fieldName)) { $cache[$key]['isIdentifier'] = true; } else { $cache[$key]['isIdentifier'] = false; } - $type = $table->getTypeOfColumn($last); if ($type == 'integer' || $type == 'string') { $cache[$key]['isSimpleType'] = true; diff --git a/lib/Doctrine/Query.php b/lib/Doctrine/Query.php index a4d0b40f8..c446274d3 100644 --- a/lib/Doctrine/Query.php +++ b/lib/Doctrine/Query.php @@ -648,10 +648,6 @@ public function parseSelect($dql) $this->_queryComponents[$componentAlias]['agg'][$index] = $alias; - if (preg_match('/^([^\(]+)\.(\'?)(.*?)(\'?)$/', $expression, $field)) { - $this->_queryComponents[$componentAlias]['agg_field'][$index] = $field[3]; - } - $this->_neededTables[] = $tableAlias; } else { $e = explode('.', $terms[0]); diff --git a/lib/Doctrine/Query/Abstract.php b/lib/Doctrine/Query/Abstract.php index 247886f1c..6042ed18e 100644 --- a/lib/Doctrine/Query/Abstract.php +++ b/lib/Doctrine/Query/Abstract.php @@ -206,16 +206,6 @@ abstract class Doctrine_Query_Abstract * * map the name of the column / aggregate value this * component is mapped to a collection - * - * agg_field the field names for each aggregates - * Example: - * DQL: COMPONENT.FIELD as ALIAS - * SQL: TABLE.COLUMN as TABLE__0 - * $_queryComponents - * agg: - * 0: ALIAS - * agg_field: - * 0: FIELD */ protected $_queryComponents = array(); @@ -1269,9 +1259,6 @@ protected function _constructQueryFromCache($cached) if (isset($components['agg'])) { $queryComponents[$alias]['agg'] = $components['agg']; } - if (isset($components['agg_field'])) { - $queryComponents[$alias]['agg_field'] = $components['agg_field']; - } if (isset($components['map'])) { $queryComponents[$alias]['map'] = $components['map']; } @@ -1302,9 +1289,6 @@ public function getCachedForm($customComponent = null) if (isset($components['agg'])) { $componentInfo[$alias]['agg'] = $components['agg']; } - if (isset($components['agg_field'])) { - $componentInfo[$alias]['agg_field'] = $components['agg_field']; - } if (isset($components['map'])) { $componentInfo[$alias]['map'] = $components['map']; }