Skip to content

Commit

Permalink
prevent initialization of references during flush
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith77 committed Apr 10, 2012
1 parent 5a79ff0 commit 15b329b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Doctrine/ODM/PHPCR/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,12 @@ private function computeChangeSet(ClassMetadata $class, $document)

foreach ($class->associationsMappings as $assocName => $assoc) {
if ($actualData[$assocName]) {
if ($actualData[$assocName] instanceof PersistentCollection
&& !$actualData[$assocName]->isInitialized()
) {
continue;
}

if (is_array($actualData[$assocName]) || $actualData[$assocName] instanceof Collection) {
foreach ($actualData[$assocName] as $ref) {
if ($ref !== null) {
Expand Down

0 comments on commit 15b329b

Please sign in to comment.