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
0370cedc
Commit
0370cedc
authored
Apr 15, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #966.
parent
66fb71ac
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
9 deletions
+56
-9
Doctrine.php
lib/Doctrine.php
+3
-0
Hydrator.php
lib/Doctrine/Hydrator.php
+7
-5
Record.php
lib/Doctrine/Record.php
+46
-1
BasicHydrationTest.php
tests/Orm/Hydration/BasicHydrationTest.php
+0
-3
No files found.
lib/Doctrine.php
View file @
0370cedc
...
...
@@ -1080,6 +1080,9 @@ final class Doctrine
return
true
;
}
/* TODO: Move the following code out of here. A generic Doctrine_Autoloader
class that can be configured in various ways might be a good idea.
Same goes for locate().*/
$loadedModels
=
self
::
$_loadedModelFiles
;
if
(
isset
(
$loadedModels
[
$className
])
&&
file_exists
(
$loadedModels
[
$className
]))
{
...
...
lib/Doctrine/Hydrator.php
View file @
0370cedc
...
...
@@ -94,7 +94,10 @@ class Doctrine_Hydrator extends Doctrine_Hydrator_Abstract
$prev
=
array
();
// holds the values of the identifier/primary key fields of components,
// separated by a pipe '|' and grouped by component alias (r, u, i, ... whatever)
// the $idTemplate is a prepared template. $id is set to a fresh template when
// starting to process a row.
$id
=
array
();
$idTemplate
=
array
();
// Holds the resulting hydrated data structure
$result
=
$driver
->
getElementCollection
(
$rootComponentName
);
...
...
@@ -111,12 +114,13 @@ class Doctrine_Hydrator extends Doctrine_Hydrator_Abstract
$listeners
[
$componentName
]
=
$component
[
'table'
]
->
getRecordListener
();
$identifierMap
[
$dqlAlias
]
=
array
();
$prev
[
$dqlAlias
]
=
array
();
$id
[
$dqlAlias
]
=
''
;
$id
Template
[
$dqlAlias
]
=
''
;
}
// Process result set
$cache
=
array
();
while
(
$data
=
$stmt
->
fetch
(
Doctrine
::
FETCH_ASSOC
))
{
$id
=
$idTemplate
;
// initialize the id-memory
$nonemptyComponents
=
array
();
$rowData
=
$this
->
_gatherRowData
(
$data
,
$cache
,
$id
,
$nonemptyComponents
);
...
...
@@ -233,9 +237,7 @@ class Doctrine_Hydrator extends Doctrine_Hydrator_Abstract
}
$coll
=&
$prev
[
$parent
][
$relationAlias
];
$this
->
_setLastElement
(
$prev
,
$coll
,
$index
,
$dqlAlias
,
$oneToOne
);
$id
[
$dqlAlias
]
=
''
;
}
$id
[
$rootAlias
]
=
''
;
}
$stmt
->
closeCursor
();
...
...
lib/Doctrine/Record.php
View file @
0370cedc
This diff is collapsed.
Click to expand it.
tests/Orm/Hydration/BasicHydrationTest.php
View file @
0370cedc
...
...
@@ -71,8 +71,5 @@ class Orm_Hydration_BasicHydrationTest extends Doctrine_OrmTestCase
$this
->
assertEquals
(
2
,
$objectResult
[
1
]
->
id
);
$this
->
assertEquals
(
'jwage'
,
$objectResult
[
1
]
->
name
);
//Doctrine::dump($res);
$this
->
assertEquals
(
0
,
0
);
}
}
\ No newline at end of file
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