From 980771810033d72346b02d08d1f115380bde70b5 Mon Sep 17 00:00:00 2001 From: flack Date: Sun, 17 Nov 2013 11:31:21 +0100 Subject: [PATCH] Also skip entities scheduled for deletion when committing multiple entities --- lib/Doctrine/ORM/UnitOfWork.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index fdd15f7db..9818ca6a8 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -733,10 +733,10 @@ class UnitOfWork implements PropertyChangedListener continue; } - // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION are processed here. + // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here. $oid = spl_object_hash($entity); - if ( ! isset($this->entityInsertions[$oid]) && isset($this->entityStates[$oid])) { + if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { $this->computeChangeSet($class, $entity); } }