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
097d1d6b
Commit
097d1d6b
authored
Dec 11, 2009
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixed _doMerge not to use hydrateAdd.
parent
731c9718
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
StandardEntityPersister.php
lib/Doctrine/ORM/Persisters/StandardEntityPersister.php
+1
-1
UnitOfWork.php
lib/Doctrine/ORM/UnitOfWork.php
+7
-3
No files found.
lib/Doctrine/ORM/Persisters/StandardEntityPersister.php
View file @
097d1d6b
...
@@ -157,7 +157,7 @@ class StandardEntityPersister
...
@@ -157,7 +157,7 @@ class StandardEntityPersister
}
}
}
}
}
}
$stmt
->
execute
();
$stmt
->
execute
();
if
(
$isPostInsertId
)
{
if
(
$isPostInsertId
)
{
...
...
lib/Doctrine/ORM/UnitOfWork.php
View file @
097d1d6b
...
@@ -1376,11 +1376,11 @@ class UnitOfWork implements PropertyChangedListener
...
@@ -1376,11 +1376,11 @@ class UnitOfWork implements PropertyChangedListener
}
}
}
}
if
(
$class
->
isChangeTrackingNotify
())
{
if
(
$class
->
isChangeTrackingNotify
())
{
//TODO
//TODO
: put changed fields in changeset...?
}
}
}
}
if
(
$class
->
isChangeTrackingDeferredExplicit
())
{
if
(
$class
->
isChangeTrackingDeferredExplicit
())
{
//TODO
//TODO
: Mark $managedCopy for dirty check...? ($this->_scheduledForDirtyCheck)
}
}
}
}
...
@@ -1389,8 +1389,12 @@ class UnitOfWork implements PropertyChangedListener
...
@@ -1389,8 +1389,12 @@ class UnitOfWork implements PropertyChangedListener
$prevClass
=
$this
->
_em
->
getClassMetadata
(
get_class
(
$prevManagedCopy
));
$prevClass
=
$this
->
_em
->
getClassMetadata
(
get_class
(
$prevManagedCopy
));
if
(
$assoc
->
isOneToOne
())
{
if
(
$assoc
->
isOneToOne
())
{
$prevClass
->
reflFields
[
$assocField
]
->
setValue
(
$prevManagedCopy
,
$managedCopy
);
$prevClass
->
reflFields
[
$assocField
]
->
setValue
(
$prevManagedCopy
,
$managedCopy
);
//TODO: What about back-reference if bidirectional?
}
else
{
}
else
{
$prevClass
->
reflFields
[
$assocField
]
->
getValue
(
$prevManagedCopy
)
->
hydrateAdd
(
$managedCopy
);
$prevClass
->
reflFields
[
$assocField
]
->
getValue
(
$prevManagedCopy
)
->
unwrap
()
->
add
(
$managedCopy
);
if
(
$assoc
->
isOneToMany
())
{
$class
->
reflFields
[
$assoc
->
mappedByFieldName
]
->
setValue
(
$managedCopy
,
$prevManagedCopy
);
}
}
}
}
}
...
...
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