-
-
Save doctrinebot/a2dff996a68ac6244176 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-890 - https://github.com/doctrine/doctrine2/issues/5415
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php | |
index 5088bb2..f774e9c 100644 | |
--- a/lib/Doctrine/ORM/UnitOfWork.php | |
+++ b/lib/Doctrine/ORM/UnitOfWork.php | |
@@ -1284,6 +1284,9 @@ class UnitOfWork implements PropertyChangedListener | |
$class = $this->em->getClassMetadata(get_class($entity)); | |
$entityState = $this->getEntityState($entity); | |
+ | |
+ $this->cascadeRemove($entity, $visited); | |
+ | |
switch ($entityState) { | |
case self::STATE_NEW: | |
case self::STATE_REMOVED: | |
@@ -1303,8 +1306,6 @@ class UnitOfWork implements PropertyChangedListener | |
default: | |
throw new UnexpectedValueException("Unexpected entity state: $entityState."); | |
} | |
- | |
- $this->cascadeRemove($entity, $visited); | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment