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
a0a9df9b
Commit
a0a9df9b
authored
Jun 04, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
4d0310bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
22 deletions
+19
-22
Hydrate.php
lib/Doctrine/Hydrate.php
+19
-22
No files found.
lib/Doctrine/Hydrate.php
View file @
a0a9df9b
...
@@ -803,23 +803,20 @@ class Doctrine_Hydrate implements Serializable
...
@@ -803,23 +803,20 @@ class Doctrine_Hydrate implements Serializable
if
(
!
isset
(
$cache
[
$key
]))
{
if
(
!
isset
(
$cache
[
$key
]))
{
$e
=
explode
(
'__'
,
$key
);
$e
=
explode
(
'__'
,
$key
);
$cache
[
$key
][
'field'
]
=
$field
=
strtolower
(
array_pop
(
$e
));
$cache
[
$key
][
'field'
]
=
$field
=
strtolower
(
array_pop
(
$e
));
$componentAlias
=
$this
->
_tableAliases
[
strtolower
(
implode
(
'__'
,
$e
))];
$cache
[
$key
][
'alias'
]
=
$this
->
_tableAliases
[
strtolower
(
implode
(
'__'
,
$e
))];
$cache
[
$key
][
'alias'
]
=
$componentAlias
;
if
(
isset
(
$this
->
_aliasMap
[
$componentAlias
][
'relation'
]))
{
$cache
[
$key
][
'component'
]
=
$this
->
_aliasMap
[
$componentAlias
][
'relation'
]
->
getAlias
();
$cache
[
$key
][
'parent'
]
=
$this
->
_aliasMap
[
$componentAlias
][
'parent'
];
}
else
{
$cache
[
$key
][
'component'
]
=
$this
->
_aliasMap
[
$componentAlias
][
'table'
]
->
getComponentName
();
}
}
}
$map
=
$this
->
_aliasMap
[
$cache
[
$key
][
'alias'
]];
$table
=
$map
[
'table'
];
$alias
=
$cache
[
$key
][
'alias'
];
$alias
=
$cache
[
$key
][
'alias'
];
$component
=
$cache
[
$key
][
'component'
];
$componentName
=
$this
->
_aliasMap
[
$cache
[
$key
][
'alias'
]][
'table'
]
->
getComponentName
();
$componentName
=
$map
[
'table'
]
->
getComponentName
();
$table
=
$this
->
_aliasMap
[
$cache
[
$key
][
'alias'
]][
'table'
];
if
(
isset
(
$map
[
'relation'
]))
{
$componentAlias
=
$map
[
'relation'
]
->
getAlias
();
}
else
{
$componentAlias
=
$map
[
'table'
]
->
getComponentName
();
}
if
(
!
isset
(
$currData
[
$alias
]))
{
if
(
!
isset
(
$currData
[
$alias
]))
{
...
@@ -850,29 +847,29 @@ class Doctrine_Hydrate implements Serializable
...
@@ -850,29 +847,29 @@ class Doctrine_Hydrate implements Serializable
$coll
=&
$array
;
$coll
=&
$array
;
}
else
{
}
else
{
$parent
=
$
cache
[
$key
]
[
'parent'
];
$parent
=
$
map
[
'parent'
];
$relation
=
$
this
->
_aliasMap
[
$cache
[
$key
][
'alias'
]]
[
'relation'
];
$relation
=
$
map
[
'relation'
];
// check the type of the relation
// check the type of the relation
if
(
!
$relation
->
isOneToOne
())
{
if
(
!
$relation
->
isOneToOne
())
{
// initialize the collection
// initialize the collection
if
(
$driver
->
initRelated
(
$prev
[
$parent
],
$component
))
{
if
(
$driver
->
initRelated
(
$prev
[
$parent
],
$component
Alias
))
{
// append element
// append element
if
(
isset
(
$identifiable
[
$alias
]))
{
if
(
isset
(
$identifiable
[
$alias
]))
{
$index
=
$driver
->
search
(
$element
,
$prev
[
$parent
][
$component
]);
$index
=
$driver
->
search
(
$element
,
$prev
[
$parent
][
$component
Alias
]);
if
(
$index
===
false
)
{
if
(
$index
===
false
)
{
$prev
[
$parent
][
$component
][]
=
$element
;
$prev
[
$parent
][
$component
Alias
][]
=
$element
;
}
}
}
}
// register collection for later snapshots
// register collection for later snapshots
$driver
->
registerCollection
(
$prev
[
$parent
][
$component
]);
$driver
->
registerCollection
(
$prev
[
$parent
][
$component
Alias
]);
}
}
}
else
{
}
else
{
$prev
[
$parent
][
$component
]
=
$element
;
$prev
[
$parent
][
$component
Alias
]
=
$element
;
}
}
$coll
=&
$prev
[
$parent
][
$component
];
$coll
=&
$prev
[
$parent
][
$component
Alias
];
}
}
if
(
$index
!==
false
)
{
if
(
$index
!==
false
)
{
...
...
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