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
3a39bea9
Commit
3a39bea9
authored
Dec 09, 2009
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0][DDC-171] Fixed.
parent
909e98c6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
DebugStack.php
lib/Doctrine/DBAL/Logging/DebugStack.php
+1
-1
AbstractHydrator.php
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
+1
-1
ObjectHydrator.php
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php
+2
-0
No files found.
lib/Doctrine/DBAL/Logging/DebugStack.php
View file @
3a39bea9
...
@@ -29,7 +29,7 @@ class DebugStack implements SqlLogger
...
@@ -29,7 +29,7 @@ class DebugStack implements SqlLogger
public
function
logSql
(
$sql
,
array
$params
=
null
)
public
function
logSql
(
$sql
,
array
$params
=
null
)
{
{
if
(
$this
->
enabled
)
{
if
(
$this
->
enabled
)
{
$this
->
queries
[]
=
array
(
'sql'
=>
$sql
,
'params'
=>
$params
);
$this
->
queries
[]
=
array
(
'sql'
=>
$sql
,
'params'
=>
$params
);
}
}
}
}
...
...
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
View file @
3a39bea9
...
@@ -305,7 +305,7 @@ abstract class AbstractHydrator
...
@@ -305,7 +305,7 @@ abstract class AbstractHydrator
*/
*/
private
function
_lookupDeclaringClass
(
$class
,
$fieldName
)
private
function
_lookupDeclaringClass
(
$class
,
$fieldName
)
{
{
//FIXME: What if two subclasses declare a (mapped) field with the same name?
//
FIXME: What if two subclasses declare a (mapped) field with the same name?
// We probably need to encode the information to which subclass a field
// We probably need to encode the information to which subclass a field
// belongs in the column alias / result set mapping.
// belongs in the column alias / result set mapping.
// This would solve the issue and would probably make this lookup superfluous.
// This would solve the issue and would probably make this lookup superfluous.
...
...
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php
View file @
3a39bea9
...
@@ -354,6 +354,7 @@ class ObjectHydrator extends AbstractHydrator
...
@@ -354,6 +354,7 @@ class ObjectHydrator extends AbstractHydrator
}
}
}
else
{
}
else
{
$targetClass
->
reflFields
[
$inverseAssoc
->
sourceFieldName
]
->
setValue
(
$element
,
$parentObject
);
$targetClass
->
reflFields
[
$inverseAssoc
->
sourceFieldName
]
->
setValue
(
$element
,
$parentObject
);
$this
->
_uow
->
setOriginalEntityProperty
(
spl_object_hash
(
$element
),
$inverseAssoc
->
sourceFieldName
,
$parentObject
);
}
}
}
else
if
(
$parentClass
===
$targetClass
&&
$relation
->
mappedByFieldName
)
{
}
else
if
(
$parentClass
===
$targetClass
&&
$relation
->
mappedByFieldName
)
{
// Special case: bi-directional self-referencing one-one on the same class
// Special case: bi-directional self-referencing one-one on the same class
...
@@ -362,6 +363,7 @@ class ObjectHydrator extends AbstractHydrator
...
@@ -362,6 +363,7 @@ class ObjectHydrator extends AbstractHydrator
}
else
{
}
else
{
// For sure bidirectional, as there is no inverse side in unidirectional mappings
// For sure bidirectional, as there is no inverse side in unidirectional mappings
$targetClass
->
reflFields
[
$relation
->
mappedByFieldName
]
->
setValue
(
$element
,
$parentObject
);
$targetClass
->
reflFields
[
$relation
->
mappedByFieldName
]
->
setValue
(
$element
,
$parentObject
);
$this
->
_uow
->
setOriginalEntityProperty
(
spl_object_hash
(
$element
),
$relation
->
mappedByFieldName
,
$parentObject
);
}
}
// Update result pointer
// Update result pointer
$this
->
_resultPointers
[
$dqlAlias
]
=
$element
;
$this
->
_resultPointers
[
$dqlAlias
]
=
$element
;
...
...
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