Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
7e953aa2
Commit
7e953aa2
authored
May 24, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
subquery aliases now mapped to aliasMap
parent
074a434a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
Hydrate.php
lib/Doctrine/Hydrate.php
+4
-6
Query.php
lib/Doctrine/Query.php
+1
-4
No files found.
lib/Doctrine/Hydrate.php
View file @
7e953aa2
...
...
@@ -81,16 +81,14 @@ class Doctrine_Hydrate
* relation the relation object owned by the parent
*
* parent the alias of the parent
*
* subAgg the subquery aggregates of this component
*/
protected
$_aliasMap
=
array
();
/**
*
*/
protected
$pendingAggregates
=
array
();
/**
*
*/
protected
$subqueryAggregates
=
array
();
/**
* @var array $aggregateMap an array containing all aggregate aliases, keys as dql aliases
* and values as sql aliases
...
...
@@ -335,8 +333,8 @@ class Doctrine_Hydrate
if
(
isset
(
$this
->
pendingAggregates
[
$alias
][
$index
]))
{
$agg
=
$this
->
pendingAggregates
[
$alias
][
$index
][
3
];
}
elseif
(
isset
(
$this
->
subqueryAggregates
[
$alias
][
$index
]))
{
$agg
=
$this
->
subqueryAggregates
[
$alias
][
$index
];
}
elseif
(
isset
(
$this
->
_aliasMap
[
$alias
][
'subAgg'
][
$index
]))
{
$agg
=
$this
->
_aliasMap
[
$alias
][
'subAgg'
][
$index
];
}
$record
->
mapValue
(
$agg
,
$value
);
$found
=
true
;
...
...
lib/Doctrine/Query.php
View file @
7e953aa2
...
...
@@ -32,9 +32,6 @@ Doctrine::autoload('Doctrine_Query_Abstract');
*/
class
Doctrine_Query
extends
Doctrine_Query_Abstract
implements
Countable
{
/**
* @param array $subqueryAliases the table aliases needed in some LIMIT subqueries
*/
protected
$subqueryAliases
=
array
();
/**
* @param boolean $needsSubquery
...
...
@@ -441,7 +438,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$this
->
parts
[
'select'
][]
=
'('
.
$sql
.
') AS '
.
$sqlAlias
;
$this
->
aggregateMap
[
$alias
]
=
$sqlAlias
;
$this
->
subqueryAggregates
[
$componentAlias
][]
=
$alias
;
$this
->
_aliasMap
[
$componentAlias
][
'subAgg'
][]
=
$alias
;
}
$this
->
pendingSubqueries
=
array
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment