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
34a54f52
Commit
34a54f52
authored
Jun 13, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
afda33da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
Hydrate.php
lib/Doctrine/Hydrate.php
+17
-17
No files found.
lib/Doctrine/Hydrate.php
View file @
34a54f52
...
@@ -569,28 +569,26 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
...
@@ -569,28 +569,26 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
* @param array $row
* @param array $row
* @return Doctrine_Record
* @return Doctrine_Record
*/
*/
public
function
mapAggregateValues
(
$record
,
array
$row
,
$alias
)
public
function
mapAggregateValues
(
&
$record
,
array
$row
,
$alias
)
{
{
$found
=
false
;
$found
=
false
;
// aggregate values have numeric keys
if
(
isset
(
$row
[
0
]))
{
// map each aggregate value
foreach
(
$row
as
$index
=>
$value
)
{
$agg
=
false
;
// map each aggregate value
foreach
(
$row
as
$index
=>
$value
)
{
$agg
=
false
;
if
(
isset
(
$this
->
_aliasMap
[
$alias
][
'agg'
][
$index
]))
{
if
(
isset
(
$this
->
_aliasMap
[
$alias
][
'agg'
][
$index
]))
{
$agg
=
$this
->
_aliasMap
[
$alias
][
'agg'
][
$index
];
$agg
=
$this
->
_aliasMap
[
$alias
][
'agg'
][
$index
];
}
}
if
(
is_array
(
$record
))
{
if
(
is_array
(
$record
))
{
$record
[
$agg
]
=
$value
;
$record
[
$agg
]
=
$value
;
}
else
{
}
else
{
$record
->
mapValue
(
$agg
,
$value
);
$record
->
mapValue
(
$agg
,
$value
);
}
$found
=
true
;
}
}
$found
=
true
;
}
}
return
$found
;
return
$found
;
}
}
public
function
getCachedForm
(
array
$resultSet
)
public
function
getCachedForm
(
array
$resultSet
)
...
@@ -614,13 +612,14 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
...
@@ -614,13 +612,14 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
{
{
$params
=
$this
->
_conn
->
convertBooleans
(
array_merge
(
$this
->
_params
,
$params
));
$params
=
$this
->
_conn
->
convertBooleans
(
array_merge
(
$this
->
_params
,
$params
));
$params
=
$this
->
convertEnums
(
$params
);
$params
=
$this
->
convertEnums
(
$params
);
if
(
!
$this
->
_view
)
{
if
(
!
$this
->
_view
)
{
$query
=
$this
->
getQuery
(
$params
);
$query
=
$this
->
getQuery
(
$params
);
}
else
{
}
else
{
$query
=
$this
->
_view
->
getSelectSql
();
$query
=
$this
->
_view
->
getSelectSql
();
}
}
if
(
$this
->
isLimitSubqueryUsed
()
&&
if
(
$this
->
isLimitSubqueryUsed
()
&&
$this
->
_conn
->
getDBH
()
->
getAttribute
(
Doctrine
::
ATTR_DRIVER_NAME
)
!==
'mysql'
)
{
$this
->
_conn
->
getDBH
()
->
getAttribute
(
Doctrine
::
ATTR_DRIVER_NAME
)
!==
'mysql'
)
{
...
@@ -805,6 +804,7 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
...
@@ -805,6 +804,7 @@ class Doctrine_Hydrate extends Doctrine_Object implements Serializable
}
}
while
(
$data
=
$stmt
->
fetch
(
PDO
::
FETCH_ASSOC
))
{
while
(
$data
=
$stmt
->
fetch
(
PDO
::
FETCH_ASSOC
))
{
$parse
=
true
;
$parse
=
true
;
foreach
(
$data
as
$key
=>
$value
)
{
foreach
(
$data
as
$key
=>
$value
)
{
...
...
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