From 3d12920cd46b82b7cecf0f1f47270569d37d5e12 Mon Sep 17 00:00:00 2001 From: flack Date: Sun, 17 Nov 2013 12:06:47 +0100 Subject: [PATCH] Add note about changed behaviour --- UPGRADE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index b864d8614..ae8e12ede 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,3 +1,15 @@ +# Upgrade to 2.5 + +## Updates on entities scheduled for deletion are no longer processed + +In Doctrine 2.4, if you modified properties of an entity scheduled for deletion, UnitOfWork would +produce an UPDATE statement to be executed right before the DELETE statement. The entity in question +was therefore present in ``UnitOfWork#entityUpdates``, which means that ``preUpdate`` and ``postUpdate`` +listeners were (quite pointlessly) called. In ``preFlush`` listeners, it used to be possible to undo +the scheduled deletion for updated entities (by calling ``persist()`` if the entity was found in both +``entityUpdates`` and ``entityDeletions``). This does not work any longer, because the entire changeset +calculation logic is optimized away. + # Upgrade to 2.4 ## BC BREAK: Compatibility Bugfix in PersistentCollection#matching()