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
6f6ce242
Commit
6f6ce242
authored
Dec 02, 2006
by
pookey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refs #174 - probably fixes, zYne- please check... tests are currently broken
parent
cab5b432
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Hydrate.php
lib/Doctrine/Hydrate.php
+1
-1
Query.php
lib/Doctrine/Query.php
+4
-2
No files found.
lib/Doctrine/Hydrate.php
View file @
6f6ce242
...
...
@@ -405,7 +405,7 @@ abstract class Doctrine_Hydrate extends Doctrine_Access {
$agg
=
false
;
if
(
isset
(
$this
->
pendingAggregates
[
$alias
][
$index
]))
$agg
=
$this
->
pendingAggregates
[
$alias
][
$index
][
0
];
$agg
=
$this
->
pendingAggregates
[
$alias
][
$index
][
3
];
$prev
[
$name
]
->
setAggregateValue
(
$agg
,
$value
);
}
...
...
lib/Doctrine/Query.php
View file @
6f6ce242
...
...
@@ -149,6 +149,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
case
'MIN'
:
case
'COUNT'
:
case
'AVG'
:
case
'SUM'
:
$reference
=
substr
(
$func
,
(
$pos
+
1
),
-
1
);
$e2
=
explode
(
' '
,
$reference
);
...
...
@@ -163,7 +164,8 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
$parts
=
explode
(
'.'
,
$reference
);
$alias
=
(
isset
(
$e
[
1
]))
?
$e
[
1
]
:
$name
;
$this
->
pendingAggregates
[
$parts
[
0
]][]
=
array
(
$alias
,
$parts
[
1
],
$distinct
);
$this
->
pendingAggregates
[
$parts
[
0
]][]
=
array
(
$name
,
$parts
[
1
],
$distinct
,
$alias
);
break
;
default
:
throw
new
Doctrine_Query_Exception
(
'Unknown aggregate function '
.
$name
);
...
...
@@ -180,7 +182,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
$table
=
$this
->
components
[
$componentPath
];
foreach
(
$this
->
pendingAggregates
[
$componentAlias
]
as
$args
)
{
list
(
$name
,
$arg
,
$distinct
)
=
$args
;
list
(
$name
,
$arg
,
$distinct
,
$alias
)
=
$args
;
$this
->
parts
[
"select"
][]
=
$name
.
'('
.
$distinct
.
$tableAlias
.
'.'
.
$arg
.
') AS '
.
$tableAlias
.
'__'
.
count
(
$this
->
aggregateMap
);
...
...
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